Row filtering notes table may need to account for incorrect namespace_id values
Problem
Each row in the notes table has 3 possible sharding keys. organization_id, namespace_id, project_id. At the time of writing, there are 2 unusual facts (see #444222 (comment 2875607023)):
- A row may have more than one sharding key set
-
namespace_idmay be incorrect (unless it is the only sharding key set)
Some kind of clean up is planned.
Proposal
When implementing row filtering for this table, if the unusual facts are not already eliminated by some clean up, then we need to account for them.
For example (see #444222 (comment 2875607023)):
we can move records between cells if we define the correct precedence of columns (organization_id -> project_id -> namespace_id).
namespace_idwould go last as we know there are some records in .com that will have the incorrect value in that column, but we can always trustproject_id. For those records that only havenamespace_id, we know the value is correct (last backfill fixed those)
So, first, check on the status of the clean up.