You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/09/27 00:08:48 UTC

[GitHub] [helix] zhangmeng916 commented on pull request #1411: Remove resource from customized state if all partitions are gone

zhangmeng916 commented on pull request #1411:
URL: https://github.com/apache/helix/pull/1411#issuecomment-699563372


   > ZNRecord rec = new ZNRecord(_currentStateDelta.getId());
   >  rec.getMapFields().put(partitionKey, null);
   >  ZNRecordDelta delta = new ZNRecordDelta(rec, MergeOperation.SUBTRACT);
   > 
   >  List<ZNRecordDelta> deltaList = new ArrayList<ZNRecordDelta>();
   >  deltaList.add(delta);
   >  _currentStateDelta.setDeltaList(deltaList);
   
   @jiajunwang Thanks for the suggestion. Yeah, this works. I looked at this part too, but didn't realize that we can move it to customized state provider. 


----------------------------------------------------------------
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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org