File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
phoenix-core-server/src/main/java/org/apache/phoenix/replication Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -181,6 +181,16 @@ protected void processNoMoreRoundsLeft() throws IOException {
181181 .getReplicationShardDirectoryManager ()
182182 .getNextRound (getLastRoundProcessed ())).isEmpty ()) {
183183 LOG .info ("Processed all the replication log files for {}" , logGroup );
184+ // if this RS is still in STORE_AND_FORWARD mode like when it didn't process any file
185+ // move this RS to SYNC_AND_FORWARD
186+ if (logGroup .checkAndSetMode (STORE_AND_FORWARD , SYNC_AND_FORWARD )) {
187+ // replication mode switched, notify the event handler
188+ try {
189+ logGroup .sync ();
190+ } catch (IOException e ) {
191+ LOG .info ("Failed to send sync event to {}" , logGroup );
192+ }
193+ }
184194 // TODO ensure the mTime on the group store record is older than the wait sync timeout
185195 logGroup .setHAGroupStatusToSync ();
186196 }
You can’t perform that action at this time.
0 commit comments