Skip to content

Conversation

@beryllw
Copy link
Contributor

@beryllw beryllw commented Dec 12, 2025

Purpose

Linked issue: close #2111

Brief change log

Tests

API and Format

Documentation

@beryllw beryllw marked this pull request as draft December 12, 2025 08:14
@beryllw beryllw force-pushed the auto-inc-impl branch 2 times, most recently from 45dc38a to 4d674d7 Compare December 12, 2025 15:04
@vamossagar12
Copy link
Contributor

hi, I had created this Pr: #2119 for this issue. Do we want to prefer this one over that?

@xx789633
Copy link
Contributor

Hi @vamossagar12 , we prefer this one to work on since it is more comprehensive.

@beryllw beryllw marked this pull request as ready for review December 24, 2025 06:03
@beryllw beryllw requested a review from xx789633 December 24, 2025 06:10
new Column(
column.getName(),
column.getDataType().copy(false),
column.getDataType().copy(true),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial update is required, so the data type here needs to be temporarily set to nullable.

@beryllw beryllw changed the title [kv]: Add an implementation of AutoIncIDBuffer [kv] Add an implementation of AutoIncIDBuffer Dec 25, 2025
@beryllw beryllw requested a review from xx789633 December 25, 2025 03:16
Schema schema,
ZooKeeperClient zkClient) {
int[] autoIncColumnIndexes = schema.getAutoIncColumnIndexes();
if (autoIncColumnIndexes.length > 1) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already check this in enableAutoIncrement(), do we need to do it again here?

/**
* The znode for auto increment column. The znode path is:
*
* <p>/metadata/databases/[databaseName]/tables/[tableName]/schemas/[schemaId]/columns/[columnIdx]/auto_increment_counter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to FIP, the znode path should be /metadata/databases/[databaseName]/tables/[tableName]/auto_inc/col_[columnIdx]

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.

[kv/auto increment column] Implement AutoIncIDBuffer on tablet server

3 participants