loquisgon commented on a change in pull request #11294:
URL: https://github.com/apache/druid/pull/11294#discussion_r658474991
##########
File path:
indexing-service/src/test/java/org/apache/druid/indexing/appenderator/BatchAppenderatorDriverTest.java
##########
@@ -199,4 +209,40 @@ static TransactionalSegmentPublisher makeOkPublisher()
{
return (segmentsToBeOverwritten, segmentsToBeDropped, segmentsToPublish,
commitMetadata) -> SegmentPublishResult.ok(ImmutableSet.of());
}
+
+ static class TestSegmentAllocator implements SegmentAllocator
+ {
+ private final String dataSource;
+ private final Granularity granularity;
+ private final Map<Long, AtomicInteger> counters = new HashMap<>();
+
+ public TestSegmentAllocator(String dataSource, Granularity granularity)
+ {
+ this.dataSource = dataSource;
+ this.granularity = granularity;
+ }
+
+ @Override
+ public SegmentIdWithShardSpec allocate(
+ final InputRow row,
+ final String sequenceName,
+ final String previousSegmentId,
+ final boolean skipSegmentLineageCheck
+ )
+ {
+ synchronized (counters) {
Review comment:
Removed synchronized block
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]