Mercurial > hg > Database > Alice
changeset 494:dca4b392f788 dispose
bug fix
author | sugi |
---|---|
date | Thu, 11 Dec 2014 18:27:36 +0900 |
parents | f3aae56b478f |
children | b789b8459996 |
files | src/main/java/alice/topology/node/CloseRemoteDataSegment.java src/main/java/alice/topology/node/PrepareToClose.java |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/alice/topology/node/CloseRemoteDataSegment.java Thu Dec 11 18:26:11 2014 +0900 +++ b/src/main/java/alice/topology/node/CloseRemoteDataSegment.java Thu Dec 11 18:27:36 2014 +0900 @@ -23,15 +23,14 @@ @Override public void run() { String managerKey = info.asString(); + ListManager manager = info3.asClass(ListManager.class); if (info1.from.equals(managerKey)||info2.from.equals(managerKey)) { if (DataSegment.contains(managerKey)) DataSegment.get(managerKey).shutdown(); - - ListManager manager = info3.asClass(ListManager.class); manager.deleteAll(managerKey); - ods.update(info1.key, manager); } + ods.update(info1.key, manager); new ReceiveCloseMessage(CommandType.PEEK); }
--- a/src/main/java/alice/topology/node/PrepareToClose.java Thu Dec 11 18:26:11 2014 +0900 +++ b/src/main/java/alice/topology/node/PrepareToClose.java Thu Dec 11 18:27:36 2014 +0900 @@ -30,12 +30,13 @@ ods.put(managerKey, "_CLOSEREADY", managerKey); ods.put("_CLOSEREADY", managerKey); - ods.put(info1.key, list); new CloseRemoteDataSegment(); } else { - // lost node is this node's parent + // lost node is this node's parent, so already removed + new ReceiveCloseMessage(CommandType.TAKE); } + ods.put(info1.key, list); }