@@ -83,19 +83,22 @@ public void psync() throws IOException {
83
83
@ Override
84
84
public void onEvent (Replicator replicator , Event event ) {
85
85
if (event instanceof PreRdbSyncEvent ) {
86
+ r .getLogger ().info ("id:{}, offset:{}" , configuration .getReplId (), configuration .getReplOffset ());
86
87
acc1 .incrementAndGet ();
87
88
}
88
89
89
90
if (event instanceof KeyValuePair ) {
90
91
if (flag1 .compareAndSet (false , true )) {
91
92
// will trigger full sync at this time
93
+ r .getLogger ().info ("psync close 1" );
92
94
close (replicator );
93
95
}
94
96
}
95
97
96
98
if (event instanceof PostRdbSyncEvent ) {
97
99
if (flag .compareAndSet (false , true )) {
98
100
// will trigger full sync at this time
101
+ r .getLogger ().info ("psync close 2" );
99
102
close (replicator );
100
103
Thread thread = new Thread (new JRun ());
101
104
thread .setDaemon (true );
@@ -108,13 +111,15 @@ public void onEvent(Replicator replicator, Event event) {
108
111
if (acc .get () == 500 ) {
109
112
//close current process port;
110
113
//that will auto trigger psync command
114
+ r .getLogger ().info ("psync close 3" );
111
115
r .getLogger ().info ("id:{}, offset:{}" , configuration .getReplId (), configuration .getReplOffset ());
112
116
close (replicator );
113
117
}
114
118
115
119
if (acc .get () == 1010 ) {
116
120
//close current process port;
117
121
//that will auto trigger psync command
122
+ r .getLogger ().info ("psync close 4" );
118
123
r .getLogger ().info ("id:{}, offset:{}" , configuration .getReplId (), configuration .getReplOffset ());
119
124
close (replicator );
120
125
}
0 commit comments