Open cahirodoherty-learningpool opened 3 weeks ago
@oliverfoster Any thoughts on this?
The state is concurrently read in once and updated multiple times?
How is an old state read in after an update is sent? What is the exact mechanism / order of flow?
Strategically, it's best usually to add a "last updated" timestamp on the state. Such that only states that are newer than the local/previous are accepted as updates and retries are attempted on conflict.
Basically its a one-button submit for all components:
onSubmit() {
_.each(this.componentViews, (componentView) => {
componentView.onSubmitClicked();
});
}
Yes, I don't understand where a state is being read in and in conflict. I see that submitting multiple questions at the same time would rapidly send statements.
Subject of the issue/enhancement/features
We have a custom plugin that forces submit of multiple components in one functional batch (In essence:
)
When it comes to handling a large volume of components, we have found that this effectively creates a race condition and the state that comes back may actually not be the last state sent, thus cutting off some question values when the state is loaded again on subsequent views.
I believe setting an await on https://github.com/adaptlearning/adapt-contrib-xapi/blob/master/js/XAPI.js#L1082 should help us out in this regard