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

    https://github.com/apache/phoenix/pull/37#discussion_r24948676
  
    --- 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 --
    
    The Map has one entry per row, so it can in theory grow large (upto 500K in 
theory which is the default max size). How about addition a test-only copy 
constructor for PhoenixConnection that takes in MutationState as an argument 
along with a MutationState constructor that takes a Map argument?


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