-
Notifications
You must be signed in to change notification settings - Fork 454
[kv] Add an implementation of AutoIncIDBuffer #2161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
45dc38a to
4d674d7
Compare
fluss-common/src/main/java/org/apache/fluss/metadata/Schema.java
Outdated
Show resolved
Hide resolved
fluss-common/src/test/java/org/apache/fluss/metadata/TableDescriptorTest.java
Outdated
Show resolved
Hide resolved
fluss-server/src/main/java/org/apache/fluss/server/kv/autoinc/SegmentIDGenerator.java
Outdated
Show resolved
Hide resolved
|
hi, I had created this Pr: #2119 for this issue. Do we want to prefer this one over that? |
|
Hi @vamossagar12 , we prefer this one to work on since it is more comprehensive. |
4d674d7 to
19d0475
Compare
19d0475 to
697dbcf
Compare
fluss-server/src/main/java/org/apache/fluss/server/utils/TableDescriptorValidation.java
Outdated
Show resolved
Hide resolved
fluss-common/src/main/java/org/apache/fluss/utils/json/ColumnJsonSerde.java
Outdated
Show resolved
Hide resolved
fluss-common/src/main/java/org/apache/fluss/config/ConfigOptions.java
Outdated
Show resolved
Hide resolved
| new Column( | ||
| column.getName(), | ||
| column.getDataType().copy(false), | ||
| column.getDataType().copy(true), |
There was a problem hiding this comment.
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.
| Schema schema, | ||
| ZooKeeperClient zkClient) { | ||
| int[] autoIncColumnIndexes = schema.getAutoIncColumnIndexes(); | ||
| if (autoIncColumnIndexes.length > 1) { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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]
Purpose
Linked issue: close #2111
Brief change log
Tests
API and Format
Documentation