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

    https://github.com/apache/phoenix/pull/37#discussion_r24873814
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/execute/MutationState.java ---
    @@ -78,7 +87,11 @@
         private PhoenixConnection connection;
         private final long maxSize;
         private final ImmutableBytesPtr tempPtr = new ImmutableBytesPtr();
    -    private final Map<TableRef, 
Map<ImmutableBytesPtr,Map<PColumn,byte[]>>> mutations = 
Maps.newHashMapWithExpectedSize(3); // TODO: Sizing?
    +    /**
    +     * Use {@link TreeMap} for {@link #mutations} below to enforce a 
deterministic ordering for easier testing of partial failures.
    +     * @see PartialCommitIT
    +     */
    +    private final Map<TableRef, Map<ImmutableBytesPtr,RowMutationState>> 
mutations = Maps.newTreeMap(new TableRefComparator());
    --- End diff --
    
    TreeMap perf and memory usage isn't nearly as good as HashMap. Can you just 
sort the results in your test where we don't care about perf?


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