clintropolis commented on code in PR #14053:
URL: https://github.com/apache/druid/pull/14053#discussion_r1162186677
##########
processing/src/test/java/org/apache/druid/segment/IndexBuilder.java:
##########
@@ -222,15 +223,31 @@ public QueryableIndex buildMMappedIndex()
Preconditions.checkNotNull(indexMerger, "indexMerger");
Preconditions.checkNotNull(tmpDir, "tmpDir");
try (final IncrementalIndex incrementalIndex = buildIncrementalIndex()) {
+ List<IndexableAdapter> adapters = Collections.singletonList(
+ new QueryableIndexIndexableAdapter(
+ indexIO.loadIndex(
+ indexMerger.persist(
+ incrementalIndex,
+ new File(
+ tmpDir,
+ StringUtils.format("testIndex-%s",
ThreadLocalRandom.current().nextInt(Integer.MAX_VALUE))
+ ),
+ indexSpec,
+ null
+ )
+ )
+ )
+ );
+ // still merge it since that follows the normal path of persist then
merge
Review Comment:
> This is gonna have performance implications for test run times too, I
fear. But, if we only ever do this once for each data set that we are indexing,
it shouldn't be good expensive...
yeah, I was concerned about that, but it looks like it hasn't made the
(already terrible) processing tests times any worse, so I think its worth it
because of the extra coverage of ensuring both indexable adapters are flexed
when building test data segments (and more closely matches current ingest task
behavior)
--
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]