A single measurement can belong to different retention policies.
Can anyone give an example of how this is possible? From what I’m seeing measurements are scoped by retention policies, thus “mydb.myfirstpolicy.mymeasurement” is completely distinct and unrelated measurement to “mydb.myotherpolicy.mymeasurement”.
So could you please give me example of how it is possible for the same measurement to belong to two different retention policies?
Each point is stored within exactly one database within exactly one retention policy. A database is a container for users, retention policies, and points. A retention policy configures how long InfluxDB keeps points (duration), how many copies of those points are stored in the cluster (replication factor), and the time range covered by shard groups (shard group duration). The retention policy makes it easy for users (and efficient for the database) to drop older data that is no longer needed. This is a common pattern in time series applications.
You could create the same named measurement in two different RPs, but they are not really the same - they are physically separate on disk.
The measurement ‘cpu’ could be present in multiple RPs, but those measurements have separate storage and would be unrelated. This isn’t a great practice, though. Naming two separate measurements the same name can cause other issues.