Skip to content

feat(sync): add no_grants sync type#934

Open
manojacs wants to merge 3 commits into
mainfrom
manojacs/no-grants-sync-type
Open

feat(sync): add no_grants sync type#934
manojacs wants to merge 3 commits into
mainfrom
manojacs/no-grants-sync-type

Conversation

@manojacs

@manojacs manojacs commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

New no_grants sync type, a full snapshot that skips grants, so we can run a fast grant-free sweep instead of a full sync.

WithSkipGrants already 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_grants sync helps us get the non-grants stuff at incremental sync speed.

SyncTypeFull SyncType = "full"
SyncTypePartial SyncType = "partial"
SyncTypeResourcesOnly SyncType = "resources_only"
SyncTypeNoGrants SyncType = "no_grants" // everything but grants

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 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).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pebble still in WIP. But, I'll add it anyways.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

General PR Review: feat(sync): add no_grants sync type

Blocking Issues: 0 | Suggestions: 0 | Threads Resolved: 0
Review mode: incremental since 731b19b
View review run

Review Summary

The new commits add the SYNC_TYPE_NO_GRANTS = 6 proto enum value and wire it through all three Pebble v2↔v3 mapping functions (v2SyncTypeToV3, v3SyncTypeToString, syncTypeV3ToConnectorstore), directly addressing the previous review's blocking finding. A round-trip test confirms the mapping is correct. No new issues found.

Security Issues

None found.

Correctness Issues

None found.

Suggestions

None.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues found.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking issues found — see review comments.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blocking issues found.

@manojacs
manojacs marked this pull request as ready for review June 9, 2026 22:22
@manojacs
manojacs requested review from a team, ggreer, kans and mj-palanker June 9, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant