Github user ctubbsii commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/68#discussion_r52684501
  
    --- Diff: 
server/master/src/main/java/org/apache/accumulo/master/Master.java ---
    @@ -1336,7 +1332,11 @@ public void assignedTablet(KeyExtent extent) {
       }
     
       @Override
    -  public Collection<KeyExtent> migrations() {
    -    return migrations.keySet();
    +  public Set<KeyExtent> migrations() {
    +    Set<KeyExtent> migrationsCopy = new HashSet<KeyExtent>();
    +    synchronized (migrations) {
    +      migrationsCopy.addAll(migrations.keySet());
    +    }
    +    return migrationsCopy;
    --- End diff --
    
    I'll go ahead and do the immutability, as well as rename the method... but 
I'll add a Javadoc to clearly state that it's immutible. It looks like the 
other (test) implementations are already immutable anyway.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to