ref(bigtable): move payload column to new "fpg"/"fpm" column families#565
ref(bigtable): move payload column to new "fpg"/"fpm" column families#565matt-codecov wants to merge 1 commit into
Conversation
|
bugbot run |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #565 +/- ##
==========================================
+ Coverage 87.55% 87.61% +0.06%
==========================================
Files 93 93
Lines 14969 15059 +90
==========================================
+ Hits 13106 13194 +88
- Misses 1863 1865 +2
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8dcc7e8. Configure here.
| delete_row_mutation(), | ||
| mutation(mutation::Mutation::SetCell(mutation::SetCell { | ||
| family_name: family.to_owned(), | ||
| family_name: payload_family.to_owned(), |
There was a problem hiding this comment.
Orphaned payload after metadata GC
Medium Severity
Splitting payload into fpg while metadata stays in fg means the two cells are garbage-collected independently. After fg compacts away m, an orphaned fpg p cell still reads as a live object: missing metadata defaults to Manual, so expires_before ignores the past fpg timestamp and serves expired payload with default metadata.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 8dcc7e8. Configure here.
|
The metadata and payload columns are in the same column family to ensure they are deleted together on expiry. In the schema design guidelines, Google specifically mentions to put related columns into the same family. If we separate them now, we have to watch very closely for unintended consequences: Performance, atomicity, consistency. This is not a simple change. I would advise against doing this. |


RFC
the COGS rollup query we have to break down our Bigtable usage is very slow in large regions (exceeds BigQuery's 6h cutoff) and has significant impact on production latencies while it's running. this PR is a structural change to our Bigtable schema that would solve those problems.
the query groups by usecase and will sum the sizes of:
mcolumn and the payload (viam.size, chore(bigtable): write size to metadata #490) for objectstandrcolumns for tombstonesthe query is slow because, as i understand it, the
pcolumn is in the same column family which puts it in the same SSTable. so even though the query doesn't actually read thepcolumn, we still have to seek past it, and our query consequently tries to monopolize the disk head for hours for a front-to-back scan.by moving
pto separatefpg/fpmfamilies (payload versions offg/fm), queries that don't touchponly have to seek overm/t/rwhich is like 1% of the dataincidentally this may improve the performance of production operations that don't touch the payload (
get_metadata())