You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2019/08/06 06:54:29 UTC
[GitHub] [incubator-pinot] chenboat commented on a change in pull request
#4494: Fix potential NPE from HelixDataAccessor
chenboat commented on a change in pull request #4494: Fix potential NPE from HelixDataAccessor
URL: https://github.com/apache/incubator-pinot/pull/4494#discussion_r310905465
##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManager.java
##########
@@ -223,17 +223,19 @@ public void cleanupLLC(final String realtimeTableName) {
// If there are any completions in the pipeline we let them commit.
Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS);
- IdealState idealState = HelixHelper.getTableIdealState(_helixManager, realtimeTableName);
final List<String> segmentsToRemove = new ArrayList<String>();
- Set<String> allSegments = idealState.getPartitionSet();
- int removeCount = 0;
- for (String segmentName : allSegments) {
- if (SegmentName.isLowLevelConsumerSegmentName(segmentName)) {
- segmentsToRemove.add(segmentName);
- removeCount++;
+ IdealState idealState = HelixHelper.getTableIdealState(_helixManager, realtimeTableName);
+ if (idealState != null) {
Review comment:
NIT for easier reading.
if (idealState == null) {
return;
}
.....
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org