surekhasaharan commented on a change in pull request #7595: Optimize
overshadowed segments computation
URL: https://github.com/apache/incubator-druid/pull/7595#discussion_r290890341
##########
File path:
server/src/main/java/org/apache/druid/metadata/SQLMetadataSegmentManager.java
##########
@@ -461,18 +462,22 @@ public boolean removeDataSource(final String dataSource)
return true;
}
+ /**
+ * This method does not update {@code dataSourcesSnapshot}, see the comments
in {@code doPoll()} about
+ * snapshot update. The segment removal will be reflected after next poll
cyccle runs.
+ */
@Override
- public boolean removeSegment(String dataSourceName, final String segmentId)
+ public boolean removeSegment(String dataSourceName, final String identifier)
{
- try {
- return removeSegmentFromTable(segmentId);
- }
- catch (Exception e) {
- log.error(e, e.toString());
- return false;
- }
+ final SegmentId segmentId = SegmentId.tryParse(dataSourceName, identifier);
Review comment:
I removed `removeSegment(String dataSourceName, final String segmentId)` as
it was used at only one place and changed `removeSegment(SegmentId segmentId)`
to `removeSegment(String segmentId)`.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]