# HG changeset patch # User one # Date 1227603294 -32400 # Node ID de4ef4313adc378d300e2e575856eda5d7bca705 # Parent 8009dd7b20135d36106278dbf5af3695dc3fafe7 looks like working... diff -r 8009dd7b2013 -r de4ef4313adc Todo --- a/Todo Tue Nov 25 09:07:52 2008 +0900 +++ b/Todo Tue Nov 25 17:54:54 2008 +0900 @@ -1,3 +1,10 @@ +Tue Nov 25 09:13:42 JST 2008 + +Todo: +だいたい動いたが、たまに爆発するバグが残っているらしい。 +どうも、optimizerのbugっぽいな... いや、違いますね。 +getMergeAgainの問題らしいが、直接の原因は良くわからない。 + Mon Nov 24 22:51:45 JST 2008 watingCommandInMerge のqueueを一旦0にしてから、manageを @@ -12,9 +19,13 @@ Editor側で、自分が出したINSERT/DELETE commandは無視する必要がある。 ついでに、Editor側でINSERT_ACK/DELETE_ACKに書き換える方が良いらしい。 +Todo: INSERT_ACK/DELETE_ACKが出ない場合があるらしい。と言うか、最初の 一回しか出ていない。 +Done: + commandInMerge の扱いが変だった。 + Wed Nov 19 19:21:47 JST 2008 ACK base に書き換えるのは良いが、途中でjoinして diff -r 8009dd7b2013 -r de4ef4313adc rep/handler/Editor.java --- a/rep/handler/Editor.java Tue Nov 25 09:07:52 2008 +0900 +++ b/rep/handler/Editor.java Tue Nov 25 17:54:54 2008 +0900 @@ -23,7 +23,7 @@ private boolean merging; private REPCommand preMergeCommand; public static boolean noMergeMode=false; - static final boolean doOptimize = true; + static final boolean doOptimize = false; public Editor(SessionManager manager,int editorNo){ // no translator case @@ -131,7 +131,7 @@ addWaitingCommand(new PacketSet(getChannel(), this, new REPCommand(command))); return true; } - ServerMainLoop.logger.writeLog("Editor eid:"+eid+" no waiting"); + //ServerMainLoop.logger.writeLog("Editor eid:"+eid+" no waiting"); return false; } @@ -148,7 +148,7 @@ private void sendEditorCommand(REPCommand command) { REPCommand keep = new REPCommand(command); sentList.add(keep); - ServerMainLoop.logger.writeLog("Editor eid:"+eid+" sentList = "+sentList); + //ServerMainLoop.logger.writeLog("Editor eid:"+eid+" sentList = "+sentList); assert(sentList.size()text.size()) { + SessionManager.logger.writeLog("Sync Completed."); syncCounter=0; } else { int i=syncCounter-1; @@ -227,7 +229,7 @@ private void handle(REPCommand cmd) { if (cmd==null) return; - ns.writeLog(name +": read "+cmd); + ns.writeLog(name +": read "+cmd + " textsize="+text.size()); switch(cmd.cmd) { case REPCMD_INSERT : if (cmd.eid!=eid) { @@ -238,7 +240,7 @@ case REPCMD_DELETE : if (cmd.eid!=eid) { String del=""; - if(cmd.lineno>text.size()) { + if(cmd.lineno