-
Notifications
You must be signed in to change notification settings - Fork 25.4k
Metrics for incremental bulk splits #116765
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
Conversation
Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing) |
Hi @ankikuma, I've created a changelog YAML for you. |
|
||
metrics.add( | ||
registry.registerLongAsyncCounter( | ||
"es.indexing.high_watermark_splits.total", |
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.
Let's include coordinating
in this name since it is at the coordinating level currently.
es.indexing.coordinating.low_watermark_splits.total
es.indexing.coordinating.high_watermark_splits.total
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.
A couple of smaller comments.
@@ -160,6 +183,14 @@ public void writeTo(StreamOutput out) throws IOException { | |||
if (out.getTransportVersion().onOrAfter(TransportVersions.V_8_15_0)) { | |||
out.writeVLong(totalCoordinatingRequests); | |||
} | |||
|
|||
if (out.getTransportVersion().onOrAfter(TransportVersions.INDEXING_PRESSURE_THROTTLING_STATS)) { | |||
out.writeVLong(lowWaterMarkSplits); |
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.
These two branches can be joined.
@@ -85,6 +91,18 @@ public IndexingPressureStats(StreamInput in) throws IOException { | |||
} else { | |||
totalCoordinatingRequests = -1L; | |||
} | |||
|
|||
if (in.getTransportVersion().onOrAfter(TransportVersions.INDEXING_PRESSURE_THROTTLING_STATS)) { |
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.
These two branches can be joined.
return (currentUsage >= lowWatermark && size >= lowWatermarkSize) || (currentUsage >= highWatermark && size >= highWatermarkSize); | ||
if (currentUsage >= highWatermark && size >= highWatermarkSize) { | ||
highWaterMarkSplits.getAndIncrement(); | ||
logger.trace(() -> Strings.format("Split bulk due to high watermark: currentUsage [%d] and size [%d]", currentUsage, size)); |
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.
Perhaps this should either be labelled "current bytes". Or the currentUsage
variable should be printed in a bytes representation.
@@ -65,7 +65,7 @@ protected Settings nodeSettings(int nodeOrdinal, Settings otherSettings) { | |||
.put(super.nodeSettings(nodeOrdinal, otherSettings)) | |||
.put(IndexingPressure.SPLIT_BULK_LOW_WATERMARK.getKey(), "512B") | |||
.put(IndexingPressure.SPLIT_BULK_LOW_WATERMARK_SIZE.getKey(), "2048B") | |||
.put(IndexingPressure.SPLIT_BULK_HIGH_WATERMARK.getKey(), "2KB") | |||
.put(IndexingPressure.SPLIT_BULK_HIGH_WATERMARK.getKey(), "4KB") | |||
.put(IndexingPressure.SPLIT_BULK_HIGH_WATERMARK_SIZE.getKey(), "1024B") | |||
.build(); | |||
} |
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.
There are tests in this class testIncrementalBulkLowWatermarkBackOff
and testIncrementalBulkHighWatermarkBackOff
. Can we modify them to ensure that IndexingPressure indexingPressure
properly accounts for the splits? We check indexing pressure stats for other things in this IT so it should be a small addition.
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.
Sure. Done.
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.
LGTM
Add metrics to track incremental bulk request splits due to indexing pressure. Resolves ES-9612
Add metrics to track incremental bulk request splits due to indexing pressure. Resolves ES-9612
Add metrics to track incremental bulk request splits due to indexing pressure. Resolves ES-9612
Adding metrics to track incremental bulk request splits due to indexing pressure. Also added tests to test the metrics.
While writing tests I found that the low and high watermark thresholds in IncrementalBulkIT.java need a small tweak (without this tweak all splits are caused by high watermark thresholds and the low watermark thresholds don't kick in).
Resolves ES-9612