Skip to content

[protocol][compat] Stage StoreMetaValue v48 (version-level maxNearlineRecordSizeBytes) - #2991

Merged
KaiSernLim merged 1 commit into
linkedin:mainfrom
KaiSernLim:kailim/nearline-record-size-protocol-v48
Aug 26, 2026
Merged

[protocol][compat] Stage StoreMetaValue v48 (version-level maxNearlineRecordSizeBytes)#2991
KaiSernLim merged 1 commit into
linkedin:mainfrom
KaiSernLim:kailim/nearline-record-size-protocol-v48

Conversation

@KaiSernLim

@KaiSernLim KaiSernLim commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Stages the StoreMetaValue v48 protocol, split out of #2986 (the per-version logic PR) so it lands as an isolated, low-risk schema change.

  • New version-level maxNearlineRecordSizeBytes on the nested StoreVersion record, as a nullable union ["null","int"] (default null):
    • null = the version predates v48 (no snapshot) → runtime falls back to the live store-level value.
    • non-null (including -1) = an immutable per-version snapshot that later store-level changes do not affect.
  • Refines the doc on the existing store-level StoreProperties.maxNearlineRecordSizeBytes to describe it as the snapshot source (type/default unchanged), and notes that only null-snapshot legacy versions fall back to reading it live.

Staged, not yet activated

Following the repo's staged-protocol convention (see #2971), code generation is pinned to v47 via the compileAvro versionOverrides in build.gradle, so the generated classes stay on v47 and no code path can serialize v48 yet. AvroProtocolDefinition.METADATA_SYSTEM_SCHEMA_STORE stays at 47 here.

The follow-up #2986 removes this pin, bumps METADATA_SYSTEM_SCHEMA_STORE 47→48, and adds the read/snapshot logic that consumes the new field.

Validation

  • :internal:venice-common:compileAvro copies StoreMetaValue/v47 with (OVERRIDE); the generated StoreVersion has no maxNearlineRecordSizeBytes field, so the build and all protocol/schema tests stay on v47.
  • v47(writer)→v48(reader) is backward-compatible (verified with the repo's SchemaCompatibility check): v47 data deserializes the new field as null.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Copilot AI lite review requested due to automatic review settings August 21, 2026 19:39

Copilot AI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@KaiSernLim
KaiSernLim force-pushed the kailim/nearline-record-size-protocol-v48 branch from 3dcad42 to 06709b5 Compare August 21, 2026 19:51
Copilot AI review requested due to automatic review settings August 21, 2026 19:51
@KaiSernLim KaiSernLim changed the title [protocol][build] Stage StoreMetaValue v48 (version-level maxNearlineRecordSizeBytes) [protocol] Introduce StoreMetaValue v48 (version-level maxNearlineRecordSizeBytes) Aug 21, 2026
KaiSernLim added a commit to KaiSernLim/venice that referenced this pull request Aug 21, 2026
Read and snapshot the nearline oversized-record limit per Version instead of
live from the Store. The limit is captured onto the Version at
version-creation
time in AbstractStore.addVersion (mirroring chunkingEnabled/storageMode);
nearline ingestion is continuous, so reading it live from the store would
retroactively change enforcement for already in-flight versions.

The server reads the per-version snapshot in
LeaderFollowerStoreIngestionTask.getMaxNearlineRecordSizeBytes() via a new
StoreIngestionTask.getVersion() accessor. A null snapshot (a version created
before the field existed) falls back to the live store-level value; a non-null
value (including -1) is an immutable per-version snapshot that later
store-level
changes do not affect.

Stacked on linkedin#2991, which introduces StoreMetaValue v48 and the version-level
maxNearlineRecordSizeBytes field this logic reads/writes. This PR is
schema-free; it compiles once linkedin#2991 is merged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

maxNearlineRecordSizeBytes)

Introduce StoreMetaValue schema v48, which adds a version-level
maxNearlineRecordSizeBytes field on the nested StoreVersion record (nullable
union ["null","int"], default null) and refines the doc on the existing
store-level StoreProperties.maxNearlineRecordSizeBytes to describe it as the
snapshot source (and to note that only null-snapshot legacy versions fall back
to reading it live).

Following the staged-protocol convention, generation is pinned to v47 via the
compileAvro versionOverrides so the generated classes stay on v47 and no code
path can serialize v48 yet. The override is removed and
METADATA_SYSTEM_SCHEMA_STORE is bumped to v48 in the follow-up PR (linkedin#2986) that
reads and snapshots the per-version limit.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 25, 2026 08:58
@KaiSernLim
KaiSernLim force-pushed the kailim/nearline-record-size-protocol-v48 branch from 06709b5 to 0a9bc12 Compare August 25, 2026 08:58
@KaiSernLim KaiSernLim changed the title [protocol] Introduce StoreMetaValue v48 (version-level maxNearlineRecordSizeBytes) [protocol][build] Stage StoreMetaValue v48 (version-level maxNearlineRecordSizeBytes) Aug 25, 2026

Copilot AI 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.

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated no new comments.

KaiSernLim added a commit to KaiSernLim/venice that referenced this pull request Aug 25, 2026
Read and snapshot the nearline oversized-record limit per Version instead of
live from the Store. The limit is captured onto the Version at
version-creation
time in AbstractStore.addVersion (mirroring chunkingEnabled/storageMode);
nearline ingestion is continuous, so reading it live from the store would
retroactively change enforcement for already in-flight versions.

The server reads the per-version snapshot in
LeaderFollowerStoreIngestionTask.getMaxNearlineRecordSizeBytes() via a new
StoreIngestionTask.getVersion() accessor. A null snapshot (a version created
before the v48 field existed) falls back to the live store-level value; a
non-null value (including -1) is an immutable per-version snapshot that later
store-level changes do not affect.

Activates StoreMetaValue v48 (staged in linkedin#2991) by removing the compileAvro
versionOverrides pin and bumping METADATA_SYSTEM_SCHEMA_STORE 47->48, so the
generated StoreVersion carries the new maxNearlineRecordSizeBytes field this
logic reads/writes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@KaiSernLim KaiSernLim self-assigned this Aug 26, 2026
@KaiSernLim KaiSernLim changed the title [protocol][build] Stage StoreMetaValue v48 (version-level maxNearlineRecordSizeBytes) [protocol][compat] Stage StoreMetaValue v48 (version-level maxNearlineRecordSizeBytes) Aug 26, 2026
@KaiSernLim
KaiSernLim merged commit 7fb4b28 into linkedin:main Aug 26, 2026
472 of 481 checks passed
KaiSernLim added a commit to KaiSernLim/venice that referenced this pull request Aug 31, 2026
Read and snapshot the nearline oversized-record limit per Version instead of
live from the Store. The limit is captured onto the Version at
version-creation
time in AbstractStore.addVersion (mirroring chunkingEnabled/storageMode);
nearline ingestion is continuous, so reading it live from the store would
retroactively change enforcement for already in-flight versions.

The server reads the per-version snapshot in
LeaderFollowerStoreIngestionTask.getMaxNearlineRecordSizeBytes() via a new
StoreIngestionTask.getVersion() accessor. A null snapshot (a version created
before the v48 field existed) falls back to the live store-level value; a
non-null value (including -1) is an immutable per-version snapshot that later
store-level changes do not affect.

Activates StoreMetaValue v48 (staged in linkedin#2991) by removing the compileAvro
versionOverrides pin and bumping METADATA_SYSTEM_SCHEMA_STORE 47->48, so the
generated StoreVersion carries the new maxNearlineRecordSizeBytes field this
logic reads/writes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

3 participants