[VOL-3955] Sporadically an ONU does not reach pre-reconciling reason in multiple ONU-scenario
Change-Id: I7d40a894d2f0852e3036fd99bd7d8bb7309df7f0
diff --git a/internal/pkg/onuadaptercore/mib_sync.go b/internal/pkg/onuadaptercore/mib_sync.go
index c4f8d62..9a01ae3 100644
--- a/internal/pkg/onuadaptercore/mib_sync.go
+++ b/internal/pkg/onuadaptercore/mib_sync.go
@@ -245,8 +245,16 @@
} else {
oo.baseDeviceHandler.enableUniPortStateUpdate(ctx)
}
- oo.baseDeviceHandler.stopReconciling(ctx)
go func() {
+ // Stopping reconcilement has to be delayed as in multi-ONU/multi-flow environment
+ // the parallel processing to rebuild the adapter internal flow data could still be
+ // running here. It will take only a few milliseconds until the corresponding threads
+ // will be finished as no OMCI-config is done in this use case.
+ // TODO: The timer approach should be replaced by a more sophisticated solution using
+ // a real interaction between this routine and the threads configuring the flow data
+ // after imminent release VOLTHA v2.7
+ time.Sleep(100 * time.Millisecond)
+ oo.baseDeviceHandler.stopReconciling(ctx)
_ = oo.pMibUploadFsm.pFsm.Event(ulEvSuccess)
}()