Skip to content

Conversation

@Lalant
Copy link
Contributor

@Lalant Lalant commented Jan 16, 2026

@Lalant Lalant marked this pull request as draft January 16, 2026 15:02

@Test
void pendingWriteIntentsMetric() {
String tabName = "test_table_pending_wi";
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't usually use short "abbreviations" like tab in Ignite 3. Ignite 2 and Ignite 3 have different code style guidelines, please keep that in mind.

tx.commit();
}

expectPendingWriteIntents(tabName, 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please run this test several hundred or thousand times. I'm afraid that it might be unstable. Write intents cleanup is an asynchronous process, as far as I know, and here you're just hoping that it is completed between tx.commit() and expectPendingWriteIntents(tabName, 0), which is not guaranteed.

I think you should use awaitility to wait until this method stops throwing assertions. Not sure about the next one, please check if there are any transitive guarantees for modsCount value. Maybe there aren't any

Copy link
Contributor Author

Choose a reason for hiding this comment

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

expectPendingWriteIntents is a custom method which does use Awaitility.

Comment on lines 514 to 516
public int getPendingRowAmount() {
return pendingRows.getPendingRowAmount();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe it's Count, not Amount. Rows are countable, you can say "3 rows" and it'll be grammatically correct. I'd also use Rows, not Row

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, the count is much better. Regarding rows vs row I would disagree. English compound nouns keep the modifier singular (user count, item count, row count).


storageUpdateHandler.start(onNodeRecovery);

registerPartitionModificationCounterMetrics(table, partitionId, modificationCounter, storageUpdateHandler::getPendingRowAmount);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please rename this method as well, so that it matches the name of metric source

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@Lalant Lalant force-pushed the ignite-27178-pending-write-intent-metrics branch from a21a33c to 7260bc6 Compare January 22, 2026 08:04
@Lalant Lalant force-pushed the ignite-27178-pending-write-intent-metrics branch from 7260bc6 to 8d0d138 Compare January 22, 2026 08:13
@sk0x50 sk0x50 self-requested a review January 23, 2026 15:52
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