Skip to content

Commit

Permalink
GEODE-1692: Handle IllegalStateException when node is disconnecting f…
Browse files Browse the repository at this point in the history
…rom distributed system.
  • Loading branch information
pivotal-eshu committed Jul 26, 2016
1 parent 08016b3 commit b3b2c89
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,15 @@ public void releaseLocal() {
*/
public void releaseDistributed() {
if (this.distLockId != null) {
TXLockService txls = TXLockService.createDTLS();
txls.release(this.distLockId);
try {
TXLockService txls = TXLockService.createDTLS();
txls.release(this.distLockId);
} catch (IllegalStateException ignore) {
//IllegalStateException: TXLockService cannot be created
//until connected to distributed system
//could be thrown if a jvm is disconnected from the ds,
//and tries to createDTLS() during clean up
}
this.distLockId = null;
}
}
Expand Down

0 comments on commit b3b2c89

Please sign in to comment.