-
Notifications
You must be signed in to change notification settings - Fork 135
IGNITE-27178 Add a total number of unresolved write intents as a metric #7428
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?
IGNITE-27178 Add a total number of unresolved write intents as a metric #7428
Conversation
|
|
||
| @Test | ||
| void pendingWriteIntentsMetric() { | ||
| String tabName = "test_table_pending_wi"; |
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 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); |
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.
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
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.
expectPendingWriteIntents is a custom method which does use Awaitility.
| public int getPendingRowAmount() { | ||
| return pendingRows.getPendingRowAmount(); | ||
| } |
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.
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
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.
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); |
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.
Please rename this method as well, so that it matches the name of metric source
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.
Done
a21a33c to
7260bc6
Compare
7260bc6 to
8d0d138
Compare
https://issues.apache.org/jira/projects/IGNITE/issues/IGNITE-27178