feat(sync): add no_grants sync type#934
Conversation
| SyncTypeFull SyncType = "full" | ||
| SyncTypePartial SyncType = "partial" | ||
| SyncTypeResourcesOnly SyncType = "resources_only" | ||
| SyncTypeNoGrants SyncType = "no_grants" // everything but grants |
There was a problem hiding this comment.
🟠 Bug: The Pebble engine's type-mapping functions don't handle this new type. v2SyncTypeToV3 in pkg/dotc1z/engine/pebble/adapter.go:879 maps SyncTypeNoGrants to SYNC_TYPE_UNSPECIFIED, so on Pebble-backed stores the type is silently lost on round-trip. This breaks cleanup classification, compaction base lookup, and LatestFinishedSyncID filtering. Needs a new SYNC_TYPE_NO_GRANTS = 6 in proto/c1/storage/v3/records.proto and corresponding cases in v2SyncTypeToV3, v3SyncTypeToString (adapter_reader.go:501), and syncTypeV3ToConnectorstore (adapter_sync_meta.go:116).
There was a problem hiding this comment.
Pebble still in WIP. But, I'll add it anyways.
General PR Review: feat(sync): add no_grants sync typeBlocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0 Review SummaryThe new commits add the Security IssuesNone found. Correctness IssuesNone found. SuggestionsNone. |
New
no_grantssync type, a full snapshot that skips grants, so we can run a fast grant-free sweep instead of a full sync.WithSkipGrantsalready existed, this just makes the type first class so it's tracked through the c1z lifecycle (start, union, compaction base, cleanup)PS: Grants handled only on Full sync path.
no_grantssync helps us get the non-grants stuff at incremental sync speed.