Skip to content

Bump plan hash mode from VC0 to VC1 #4559

Description

@hatyo

VC1 has existed as a PlanHashMode for a while but has never become current, the PlanHashable.CURRENT_FOR_CONTINUATION is still VC0. I counted two places that already implement VC1-specific hashing that will be exercised in prod with this switch:

  • ConstantObjectValue.planHash switches on the mode directly: VC0 hashes BASE_HASH alone, while VC1 hashes BASE_HASH together with the constantId. This is the change the VC1 javadoc in PlanHashable records as its sole entry ("ConstantObjectValue hashes without index"), the VC1-specific hashing was introduced in introduce VC1; COV does not hash ordinal anymore #2577 back in May 2024 (!).
  • RecordQueryAggregateIndexPlan (once Route aggregate index plan breadcrumb values through the match candidate #4550 lands) hashes only the result type under VC1 instead of the whole result value, and serializes accordingly, toProto omits the result value and the group-by result value, and fromProto reconstructs a QueriedValue from the type. Two fields on that plan exist purely to keep the VC0 wire format intact and are marked with todos to be deleted when the bump happens.

Bumping is user-visible: outstanding continuations hashed under VC0 will fail validation once VC1 becomes current. But once this is done, and all engine "talk" VC1, we can cleanup all of the code related to maintaining VC0-compatibility.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

breaking changeChanges that are not backwards compatibleenhancementNew feature or request

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions