You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A flake on this same test happened in the checks for this PR:
2026-03-14T00:22:35.8238939Z [ERROR] org.apache.druid.testing.embedded.compact.CompactionSupervisorTest.test_minorCompactionWithMSQ(PartitionsSpec)[1] -- Time elapsed: 14.15 s <<< FAILURE!
2026-03-14T00:22:35.8240292Z org.opentest4j.AssertionFailedError: expected: <2000> but was: <2500>
2026-03-14T00:22:35.8241262Z at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
2026-03-14T00:22:35.8242119Z at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
2026-03-14T00:22:35.8242956Z at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
2026-03-14T00:22:35.8243603Z at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
2026-03-14T00:22:35.8244240Z at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:145)
2026-03-14T00:22:35.8245464Z at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:531)
2026-03-14T00:22:35.8247116Z at org.apache.druid.testing.embedded.compact.CompactionSupervisorTest.waitUntilPublishedRecordsAreIngested(CompactionSupervisorTest.java:337)
2026-03-14T00:22:35.8249294Z at org.apache.druid.testing.embedded.compact.CompactionSupervisorTest.test_minorCompactionWithMSQ(CompactionSupervisorTest.java:255)
A flake on this same test happened in the checks for this PR:
2026-03-14T00:22:35.8238939Z [ERROR] org.apache.druid.testing.embedded.compact.CompactionSupervisorTest.test_minorCompactionWithMSQ(PartitionsSpec)[1] -- Time elapsed: 14.15 s <<< FAILURE!
2026-03-14T00:22:35.8240292Z org.opentest4j.AssertionFailedError: expected: <2000> but was: <2500>
2026-03-14T00:22:35.8241262Z at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
2026-03-14T00:22:35.8242119Z at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
2026-03-14T00:22:35.8242956Z at org.junit.jupiter.api.AssertEquals.failNotEqual(AssertEquals.java:197)
2026-03-14T00:22:35.8243603Z at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:150)
2026-03-14T00:22:35.8244240Z at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:145)
2026-03-14T00:22:35.8245464Z at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:531)
2026-03-14T00:22:35.8247116Z at org.apache.druid.testing.embedded.compact.CompactionSupervisorTest.waitUntilPublishedRecordsAreIngested(CompactionSupervisorTest.java:337)
2026-03-14T00:22:35.8249294Z at org.apache.druid.testing.embedded.compact.CompactionSupervisorTest.test_minorCompactionWithMSQ(CompactionSupervisorTest.java:255)
yes this is due to intermediatePersistPeriod set to PT10M, sometimes only 500 events are persisted to the segment and the next 500 events + next 1000 events are persisted to another segment but in this case processed events metric would be 2500.
actually it's not due to intermediatePersistPeriod, i'm not sure why but i think supervisor is shutting down tasks constantly, probably due to No task in pending completion taskGroup[0] succeeded before completion timeout elapsed, and completion timeout is set to 5s in tests.
this waitUntilPublishedRecordsAreIngested is used in multiple tests, e.x. FaultyClusterTest. i wonder they are also flaky or maybe it's because i updated the schema to inflate the segment size which made the test flaky somehow.
actually it's not due to intermediatePersistPeriod, i'm not sure why but i think supervisor is shutting down tasks constantly, probably due to No task in pending completion taskGroup[0] succeeded before completion timeout elapsed, and completion timeout is set to 5s in tests.
If that is the case, you could try increasing the completionTimeout and the taskDuration (I think the test currently uses 500ms). But that probably still doesn't guarantee that you would end up with the correct number of segments.
You could either just use batch append instead of a Kafka supervisor.
OR
Relax the assertions on the segment count and just verify that a minor compaction has actually occurred.
FYI, #19151 updates the KafkaClusterMetricsTest to run Kafka supervisor with minor compaction. So, I think we may skip trying to use Kafka supervisor in the CompactionSupervisorTest for the time being.
actually it's not due to intermediatePersistPeriod, i'm not sure why but i think supervisor is shutting down tasks constantly, probably due to No task in pending completion taskGroup[0] succeeded before completion timeout elapsed, and completion timeout is set to 5s in tests.
If that is the case, you could try increasing the completionTimeout and the taskDuration (I think the test currently uses 500ms). But that probably still doesn't guarantee that you would end up with the correct number of segments.
You could either just use batch append instead of a Kafka supervisor. OR Relax the assertions on the segment count and just verify that a minor compaction has actually occurred.
FYI, #19151 updates the KafkaClusterMetricsTest to run Kafka supervisor with minor compaction. So, I think we may skip trying to use Kafka supervisor in the CompactionSupervisorTest for the time being.
updated to use an index task instead of kafka, PTAL!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix flaky test:
BrokerServerViewbefore querying for total rowsThis PR has: