Skip to content

Commit

Permalink
0005791: Better logging of registration
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Apr 17, 2023
1 parent c648538 commit 16dfbf4
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ public boolean beforeBatchStarted(DataContext context) {
|| (batch.getChannelId() != null && batch.getChannelId().equals(
Constants.CHANNEL_CONFIG))) {
if (batch.getBatchId() == Constants.VIRTUAL_BATCH_FOR_REGISTRATION) {
/*
* Remove outgoing configuration batches because we are about to get the complete configuration.
*/
log.info("Preparing to receive registration from node {} by clearing its outgoing config batches", batch.getSourceNodeId());
IOutgoingBatchService outgoingBatchService = engine.getOutgoingBatchService();
IDataService dataService = engine.getDataService();
dataService.deleteCapturedConfigChannelData();
Expand All @@ -122,6 +120,9 @@ public boolean beforeBatchStarted(DataContext context) {
this.currentBatch = incomingBatch;
context.put("currentBatch", this.currentBatch);
if (incomingBatchService.acquireIncomingBatch(incomingBatch)) {
if (batch.getBatchId() == Constants.VIRTUAL_BATCH_FOR_REGISTRATION) {
log.info("Loading registration batch from {}", batch.getSourceNodeId());
}
return true;
}
}
Expand Down

0 comments on commit 16dfbf4

Please sign in to comment.