Skip to content

[protocol][build] Stage MetadataResponseRecord v4 - #2964

Open
ymuppala wants to merge 1 commit into
linkedin:mainfrom
ymuppala:ymuppala/stage-metadata-storage-mode
Open

[protocol][build] Stage MetadataResponseRecord v4#2964
ymuppala wants to merge 1 commit into
linkedin:mainfrom
ymuppala:ymuppala/stage-metadata-storage-mode

Conversation

@ymuppala

@ymuppala ymuppala commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Stage MetadataResponseRecord v4 with a defaulted storageMode field in VersionProperties. Keep code generation and the runtime protocol pinned to v3 so this change can roll out before activation.

The field defaults to INTERNAL (0) for compatibility with older writers.

Testing

  • ./gradlew :internal:venice-common:compileJava
  • Confirmed generated VersionProperties does not contain storageMode while the v3 override is active
  • Confirmed SERVER_METADATA_RESPONSE remains at version 3

Copilot AI lite review requested due to automatic review settings August 6, 2026 17:13

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

This PR stages a new Avro protocol version (MetadataResponseRecord v4) by adding a defaulted storageMode field to the nested VersionProperties record, while intentionally keeping Avro code generation and the active runtime protocol pinned to v3 to allow a safe, incremental rollout.

Changes:

  • Added MetadataResponseRecord v4 schema with VersionProperties.storageMode (int, default 0 / INTERNAL) for backward compatibility.
  • Updated the Avro build override list to keep MetadataResponseRecord generation pinned to v3 despite the presence of v4.

Reviewed changes

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

File Description
internal/venice-common/src/main/resources/avro/MetadataResponseRecord/v4/MetadataResponseRecord.avsc Introduces v4 schema with the new defaulted storageMode field for staged protocol evolution.
build.gradle Pins Avro compilation for MetadataResponseRecord to v3 via the version override mechanism to prevent early activation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

misyel
misyel previously approved these changes Aug 7, 2026
Adds the v4 .avsc carrying VersionProperties.storageMode, the current
version's storage mode (mirrors StoreVersion.storageMode from StoreMetaValue
v44), so a follow-up PR can expose it over the metadata fetch response and let
Fast Clients gate external-storage reads on the version actually being served.

Schema-staging only: the build.gradle versionOverrides entry pins
MetadataResponseRecord codegen to v3, so the generated VersionProperties and
the wire-format version are unchanged. A follow-up PR removes the pin, bumps
SERVER_METADATA_RESPONSE 3 -> 4, populates the field server-side, and consumes
it in the Fast Client.

The new field is an int with default 0 (= INTERNAL, Venice-only), so v3
readers and v4 writers stay compatible in both directions and clients that
never see the field behave exactly as they do today.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 7, 2026 21:07
@ymuppala
ymuppala force-pushed the ymuppala/stage-metadata-storage-mode branch from b7bc6d4 to e295f2e Compare August 7, 2026 21:07

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.

@ymuppala
ymuppala enabled auto-merge (squash) August 7, 2026 23:11
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