----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/50242/#review142966 -----------------------------------------------------------
geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueue.java (line 228) <https://reviews.apache.org/r/50242/#comment208619> The same bug exists in the next method in this class: putAndGetKeyNoSync. This method is never called so it might be best to remove it instead of fixing it. The Q team said it would be ok to delete this dead code. geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueue.java (line 234) <https://reviews.apache.org/r/50242/#comment208617> Instead of catching specific exceptions I think you should just use try/finally. I think what you want to say is "if the put did not happen then release the offheap object". boolean putCalled = false; try { this.region.put(key, (AsyncEvent)object); putCalled = true; } finally { if (!putCalled) { GatewaySenderEventImpl.release(object); } } Note the change of how the release is done (using the static method makes this code cleaner). - Darrel Schneider On July 20, 2016, 9:29 a.m., Eric Shu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/50242/ > ----------------------------------------------------------- > > (Updated July 20, 2016, 9:29 a.m.) > > > Review request for geode, Darrel Schneider and Swapnil Bawaskar. > > > Bugs: GEODE-1678 > https://issues.apache.org/jira/browse/GEODE-1678 > > > Repository: geode > > > Description > ------- > > During cache close or disconnect, a put into region queue of > GatewaySenderEventImpl may fail. The reference hold by the > GatewaySenderEventImpl will not be released later. Handle this case by > release offheap as necessary. > > > Diffs > ----- > > > geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueue.java > 57d6e34 > > Diff: https://reviews.apache.org/r/50242/diff/ > > > Testing > ------- > > precheckin. > > > Thanks, > > Eric Shu > >