Skip to content

Improved partition creation handling #1841

Open
goshev wants to merge 1 commit into
masterfrom
partition-handling
Open

Improved partition creation handling #1841
goshev wants to merge 1 commit into
masterfrom
partition-handling

Conversation

@goshev

@goshev goshev commented May 26, 2026

Copy link
Copy Markdown
Member

Handle missing partition creation during versioned writes and proactively create partitions earlier.
A failure to create partitions will not result in an operation failure during early attempts.

…vely create partitions earlier.

A failure to create partitions will not result in an operation failure during early attempts.

Signed-off-by: Dimitar Goshev <dimitar.goshev@here.com>
@goshev
goshev requested a review from a team as a code owner May 26, 2026 14:27
const bestEffortPreCreation = partitionOffset >= Math.floor(PARTITION_SIZE / 2) && version % preCreationInterval === 0;
const parameters = [this.schema, this.table, Math.floor(version / PARTITION_SIZE) + 1, PARTITION_SIZE];

if (nearFull) {

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.

The following code duplication could be solved by adding the differentiating condition simply into the catch clause. This would also make the code more readable again when it comes to parameter re-substitution.

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.

2 participants