snleee commented on code in PR #12684:
URL: https://github.com/apache/pinot/pull/12684#discussion_r1534892766
##########
pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/realtime/segment/FlushThresholdUpdaterTest.java:
##########
@@ -53,49 +53,57 @@ public class FlushThresholdUpdaterTest {
public void testFlushThresholdUpdateManager() {
FlushThresholdUpdateManager flushThresholdUpdateManager = new
FlushThresholdUpdateManager();
- // Flush threshold rows larger than 0 - DefaultFlushThresholdUpdater
should be returned
- FlushThresholdUpdater defaultFlushThresholdUpdater =
flushThresholdUpdateManager
-
.getFlushThresholdUpdater(mockStreamConfig(StreamConfig.DEFAULT_FLUSH_THRESHOLD_ROWS));
- assertTrue(defaultFlushThresholdUpdater instanceof
DefaultFlushThresholdUpdater);
- assertEquals(((DefaultFlushThresholdUpdater)
defaultFlushThresholdUpdater).getTableFlushSize(),
+ // Neither flush threshold rows nor segment size is set -
DefaultFlushThresholdUpdater should be returned
+ FlushThresholdUpdater flushThresholdUpdater =
+
flushThresholdUpdateManager.getFlushThresholdUpdater(mockStreamConfig(-1, -1));
+ assertTrue(flushThresholdUpdater instanceof DefaultFlushThresholdUpdater);
+ assertEquals(((DefaultFlushThresholdUpdater)
flushThresholdUpdater).getTableFlushSize(),
StreamConfig.DEFAULT_FLUSH_THRESHOLD_ROWS);
+ // Flush threshold rows larger than 0 - DefaultFlushThresholdUpdater
should be returned
Review Comment:
Just to make sure (I see that this is already the case as we compute the row
based config first):
When both row and segment size based configurations are configured, the
original code picked the row based option?
This is important as changing this will make the code not backward
compatible.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]