Skip to content

add API V3 keyspace identity protos#1458

Draft
disksing wants to merge 13 commits into
masterfrom
apiv3
Draft

add API V3 keyspace identity protos#1458
disksing wants to merge 13 commits into
masterfrom
apiv3

Conversation

@disksing

Copy link
Copy Markdown
Contributor

Summary

  • Add public API V3 KeyspaceIdentity schema and wire it through KV, PD, TSO, keyspace, GC, and related tenant-scoped protobuf APIs.
  • Preserve legacy keyspace_id fields for V1/V2 compatibility while documenting V3 identity semantics.
  • Update generated bindings and proto metadata for downstream API V3 consumers.

Validation

  • make proto-fmt
  • go build ./pkg/...
  • go test ./pkg/...
  • make check reached the expected proto.lock change prompt
  • cargo check is still blocked locally by the known libz/Xcode header issue

Signed-off-by: disksing <i@disksing.com>
@ti-chi-bot ti-chi-bot Bot requested a review from henrybw April 30, 2026 16:25
@ti-chi-bot ti-chi-bot Bot added the size/XXL label Apr 30, 2026
@disksing disksing changed the title [codex] add API V3 keyspace identity protos add API V3 keyspace identity protos Apr 30, 2026
disksing added 5 commits May 1, 2026 09:54
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
# Conflicts:
#	pkg/kvrpcpb/kvrpcpb.pb.go
#	pkg/pdpb/pdpb.pb.go

Signed-off-by: disksing <i@disksing.com>
Comment thread proto/pdpb.proto Outdated
Comment thread proto/autoid.proto Outdated
uint64 n = 4;
int64 increment = 5;
int64 offset = 6;
// V1/V2 compatibility keyspace id. V3 should use keyspace_identity.

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.

Suggested change
// V1/V2 compatibility keyspace id. V3 should use keyspace_identity.
// V1/V2 compatibility keyspace id. V3 should use keyspace_identity.
oneof keyspace {
uint32 keyspaceID = 7;
apipb.KeyspaceIdentity identity = 8;
}

Comment thread proto/keyspacepb.proto Outdated
KeyspaceMeta keyspace = 2;
}

message LookupKeyspaceRequest {

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.

Can we find out some scenarios when looking up keyspaces with a given name across multiple namespaces make senses.

Comment thread proto/pdpb.proto Outdated
ResponseHeader header = 1;

uint64 safe_point = 2;
// V3 keyspace identity served by this response.

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.

Is the keyspace identity helpful when it is already known when sending the request

Comment thread proto/pdpb.proto Outdated

uint64 new_safe_point = 2;
// V3 keyspace identity served by this response.
apipb.KeyspaceIdentity keyspace_identity = 3;

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.

Is the keyspace identity helpful when it is already known when sending the request

Comment thread proto/pdpb.proto Outdated
int64 ttl = 3;
uint64 min_safe_point = 4;
// V3 keyspace identity served by this response.
apipb.KeyspaceIdentity keyspace_identity = 5;

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.

Is the keyspace identity helpful when it is already known when sending the request

Comment thread proto/tsopb.proto Outdated
Comment thread proto/tsopb.proto Outdated
Comment thread proto/keyspacepb.proto Outdated
// V1/V2 compatibility pagination cursor. V3 should use namespace_id and start_keyspace_identity.
uint32 start_id = 2;
uint32 limit = 3;
// V3 namespace-limited pagination. Must be non-zero in V3.

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.

namespace-scoped pagnination

disksing added 7 commits June 11, 2026 09:19
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
@ti-chi-bot

ti-chi-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign cfzjywxk, rleungx, tiancaiamao, windtalker, yudongusa for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants