-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/38628/#review100020
-----------------------------------------------------------



gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java
 (line 1564)
<https://reviews.apache.org/r/38628/#comment157104>

    Instead of doing the check here would it be better to do it in the code 
that currently calls calcConflictString?
    
    It seems like this code:
            String fromString = calcConflictString(getOriginalVersionId());
            String toString = calcConflictString(curCmtVersionId);
            if (fromString.equals(toString)) {
              throw new 
CommitConflictException(LocalizedStrings.TXEntryState_ENTRY_FOR_KEY_0_ON_REGION_1_HAD_A_STATE_CHANGE.toLocalizedString(new
 Object[] {key, r.getDisplayName()}));
            }
            else {
              throw new 
CommitConflictException(LocalizedStrings.TXEntryState_ENTRY_FOR_KEY_0_ON_REGION_1_HAD_ALREADY_BEEN_CHANGED_FROM_2_TO_3.toLocalizedString(new
 Object[] {key, r.getDisplayName(), fromString, toString}));
            }
    
    could be changed to:
    if (SKIP_CONFLICT_STRING) {
              throw new 
CommitConflictException(LocalizedStrings.TXEntryState_ENTRY_FOR_KEY_0_ON_REGION_1_HAD_A_STATE_CHANGE.toLocalizedString(new
 Object[] {key, r.getDisplayName()}));
    } else {
      the old code that calls calcConflictString
      
    One of the things I don't like about the current skip logic is if the value 
is a CachedDeserializable we will deserialize it but then if your new sys prop 
is set we ignore the deserialized value.


- Darrel Schneider


On Sept. 22, 2015, 7:39 a.m., Swapnil Bawaskar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38628/
> -----------------------------------------------------------
> 
> (Updated Sept. 22, 2015, 7:39 a.m.)
> 
> 
> Review request for geode and Darrel Schneider.
> 
> 
> Repository: geode
> 
> 
> Description
> -------
> 
> Adding a System property gemfire.skipConflictString, which will skip 
> converting values to string on CommitConflictException.
> 
> 
> Diffs
> -----
> 
>   
> gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java
>  d8e4ef4ca535e13a0f96158bd9ad112791bf40ab 
> 
> Diff: https://reviews.apache.org/r/38628/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Swapnil Bawaskar
> 
>

Reply via email to