MINOR: Improve share coordinator record schemas (#19830)
CI / build (push) Waiting to run Details

This PR makes some very small improvements to the record schemas for the
share coordinator.

* It removes the health warnings about incompatible changes. All changes
are compatible now.
* It marks the fields in the values as version 0+, in common with all
other record schemas in Kafka.
Many were already 0+, so this just corrects the outliers.

Reviewers: Apoorv Mittal <apoorvmittal10@gmail.com>, Sushant Mahajan
<smahajan@confluent.io>
This commit is contained in:
Andrew Schofield 2025-05-28 10:24:17 +01:00 committed by GitHub
parent a3d5ca07f8
commit 5a607db6ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 24 deletions

View File

@ -13,8 +13,6 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// KIP-932 is in development. This schema is subject to non-backwards-compatible changes.
{ {
"apiKey": 0, "apiKey": 0,
"type": "coordinator-key", "type": "coordinator-key",

View File

@ -13,8 +13,6 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// KIP-932 is in development. This schema is subject to non-backwards-compatible changes.
{ {
"apiKey": 0, "apiKey": 0,
"type": "coordinator-value", "type": "coordinator-value",
@ -22,27 +20,27 @@
"validVersions": "0", "validVersions": "0",
"flexibleVersions": "0+", "flexibleVersions": "0+",
"fields": [ "fields": [
{ "name": "SnapshotEpoch", "type": "uint16", "versions": "0", { "name": "SnapshotEpoch", "type": "uint16", "versions": "0+",
"about": "The snapshot epoch." }, "about": "The snapshot epoch." },
{ "name": "StateEpoch", "type": "int32", "versions": "0+", { "name": "StateEpoch", "type": "int32", "versions": "0+",
"about": "The state epoch for this share-partition." }, "about": "The state epoch for this share-partition." },
{ "name": "LeaderEpoch", "type": "int32", "versions": "0+", { "name": "LeaderEpoch", "type": "int32", "versions": "0+",
"about": "The leader epoch of the share-partition." }, "about": "The leader epoch of the share-partition." },
{ "name": "StartOffset", "type": "int64", "versions": "0", { "name": "StartOffset", "type": "int64", "versions": "0+",
"about": "The share-partition start offset." }, "about": "The share-partition start offset." },
{ "name": "CreateTimestamp", "type": "int64", "versions": "0", { "name": "CreateTimestamp", "type": "int64", "versions": "0+",
"about": "The time at which the state was created." }, "about": "The time at which the state was created." },
{ "name": "WriteTimestamp", "type": "int64", "versions": "0", { "name": "WriteTimestamp", "type": "int64", "versions": "0+",
"about": "The time at which the state was written or rewritten." }, "about": "The time at which the state was written or rewritten." },
{ "name": "StateBatches", "type": "[]StateBatch", "versions": "0", { "name": "StateBatches", "type": "[]StateBatch", "versions": "0+",
"about": "The state batches.", "fields": [ "about": "The state batches.", "fields": [
{ "name": "FirstOffset", "type": "int64", "versions": "0", { "name": "FirstOffset", "type": "int64", "versions": "0+",
"about": "The first offset of this state batch." }, "about": "The first offset of this state batch." },
{ "name": "LastOffset", "type": "int64", "versions": "0", { "name": "LastOffset", "type": "int64", "versions": "0+",
"about": "The last offset of this state batch." }, "about": "The last offset of this state batch." },
{ "name": "DeliveryState", "type": "int8", "versions": "0", { "name": "DeliveryState", "type": "int8", "versions": "0+",
"about": "The delivery state - 0:Available,2:Acked,4:Archived." }, "about": "The delivery state - 0:Available,2:Acked,4:Archived." },
{ "name": "DeliveryCount", "type": "int16", "versions": "0", { "name": "DeliveryCount", "type": "int16", "versions": "0+",
"about": "The delivery count." } "about": "The delivery count." }
]} ]}
] ]

View File

@ -13,8 +13,6 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// KIP-932 is in development. This schema is subject to non-backwards-compatible changes.
{ {
"apiKey": 1, "apiKey": 1,
"type": "coordinator-key", "type": "coordinator-key",

View File

@ -13,8 +13,6 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// KIP-932 is in development. This schema is subject to non-backwards-compatible changes.
{ {
"apiKey": 1, "apiKey": 1,
"type": "coordinator-value", "type": "coordinator-value",
@ -22,21 +20,21 @@
"validVersions": "0", "validVersions": "0",
"flexibleVersions": "0+", "flexibleVersions": "0+",
"fields": [ "fields": [
{ "name": "SnapshotEpoch", "type": "uint16", "versions": "0", { "name": "SnapshotEpoch", "type": "uint16", "versions": "0+",
"about": "The snapshot epoch." }, "about": "The snapshot epoch." },
{ "name": "LeaderEpoch", "type": "int32", "versions": "0+", { "name": "LeaderEpoch", "type": "int32", "versions": "0+",
"about": "The leader epoch of the share-partition." }, "about": "The leader epoch of the share-partition." },
{ "name": "StartOffset", "type": "int64", "versions": "0", { "name": "StartOffset", "type": "int64", "versions": "0+",
"about": "The share-partition start offset, or -1 if the start offset is not being updated." }, "about": "The share-partition start offset, or -1 if the start offset is not being updated." },
{ "name": "StateBatches", "type": "[]StateBatch", "versions": "0", { "name": "StateBatches", "type": "[]StateBatch", "versions": "0+",
"about": "The state batches that have been updated.", "fields": [ "about": "The state batches that have been updated.", "fields": [
{ "name": "FirstOffset", "type": "int64", "versions": "0", { "name": "FirstOffset", "type": "int64", "versions": "0+",
"about": "The first offset of this state batch." }, "about": "The first offset of this state batch." },
{ "name": "LastOffset", "type": "int64", "versions": "0", { "name": "LastOffset", "type": "int64", "versions": "0+",
"about": "The last offset of this state batch." }, "about": "The last offset of this state batch." },
{ "name": "DeliveryState", "type": "int8", "versions": "0", { "name": "DeliveryState", "type": "int8", "versions": "0+",
"about": "The delivery state - 0:Available,2:Acked,4:Archived." }, "about": "The delivery state - 0:Available,2:Acked,4:Archived." },
{ "name": "DeliveryCount", "type": "int16", "versions": "0", { "name": "DeliveryCount", "type": "int16", "versions": "0+",
"about": "The delivery count." } "about": "The delivery count." }
]} ]}
] ]