accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keith-turner <>
Subject [GitHub] accumulo pull request: ACCUMULO-4143 Make protective copy of migra...
Date Thu, 11 Feb 2016 23:04:18 GMT
Github user keith-turner commented on a diff in the pull request:
    --- Diff: server/master/src/main/java/org/apache/accumulo/master/ ---
    @@ -1336,7 +1332,11 @@ public void assignedTablet(KeyExtent extent) {
    -  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 was thinking a bigger risk would be that a user would accidentally introduce a
    My hope was that the runtime exception would possibly expose a bug (in addition to causing
a bug).  However, there are certainly cases where it would only cause problems and not expose
any bugs.
    > wrapped immutability is not something which we can check at compile-time
    That would be nice to have.

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 or file a JIRA ticket
with INFRA.

View raw message