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/25 20:37:49 UTC

[GitHub] [helix] zhangmeng916 opened a new pull request #1411: Resource remove

zhangmeng916 opened a new pull request #1411:
URL: https://github.com/apache/helix/pull/1411


   ### Issues
   
   - [X] My PR addresses the following Helix issues and references them in the PR description:
   Fixes #1410 
   Any of the following keywords can be used: close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved)
   
   ### Description
   
   - [X] Here are some details about my PR, including screenshots of any UI changes:
   
   Currently if all partitions of a resource in customized state are gone, the znode itself is still there. This is not optimal, we should delete the znode once the map fields are empty. This PR fixed this issue.
   
   ### Tests
   
   - [ ] The following tests are written for this issue:
   
   (List the names of added unit/integration tests)
   
   - [ ] The following is the result of the "mvn test" command on the appropriate module:
   
   (Before CI test pass, please copy & paste the result of "mvn test")
   
   ### Documentation (Optional)
   
   - In case of new functionality, my PR adds documentation in the following wiki page:
   
   (Link the GitHub wiki you added)
   
   ### Commits
   
   - My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Code Quality
   
   - My diff has been formatted using helix-style.xml 
   (helix-style-intellij.xml if IntelliJ IDE is used)
   


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


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

Posted by GitBox <gi...@apache.org>.
zhangmeng916 commented on pull request #1411:
URL: https://github.com/apache/helix/pull/1411#issuecomment-700244104


   This PR is ready to merge. Approved by @jiajunwang 
   Final commit message:
   Remove resource from customized state if all partitions are gone.


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


[GitHub] [helix] pkuwm merged pull request #1411: Remove resource from customized state if all partitions are gone

Posted by GitBox <gi...@apache.org>.
pkuwm merged pull request #1411:
URL: https://github.com/apache/helix/pull/1411


   


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


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

Posted by GitBox <gi...@apache.org>.
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