-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a task to process offline entity submissions that have been held for a certain amount of time #682
Comments
My plan is to make a task in This will only operate on updates because submissions that create entities never get held for later. But the update could be applied on an entity that doesn't yet exist. We've talked about creating a new entity in this case. Do we need to account for create submission that come in way later than the "update-applied-as-create after it was held for a long time" submissions? Run a create-as-update? I think this gets more complicated with our create logic and constraints. I would rather have a super-delayed create submission just get marked as a conflict error. |
My instinct would be to run a create-as-update. For example, imagine an offline branch where one form creates an entity, specifying a label, then a second form updates the entity, specifying some other properties. Ideally, we'd get the label from the first submission even if it comes out of order.
Just to make sure I understand, the idea is to surface this as an entity processing error on the submission, right? It wouldn't be shown on the entity detail page? Maybe the right answer depends on how common missing submissions will be. Not very common hopefully, but common enough that we're trying to account for them? I can't think of a reason why an entity-creating submission would be less likely to be missed than an entity-updating one. |
I guess one question is how likely is it that the entity-creating submission is missing for long enough that the entity-updating submission is processed from the holding queue, but then the entity-creating submission does come in afterwards? Hopefully all submissions do come in eventually, right? I'd be interested in how likely @lognaturel thinks this is. |
One restriction I think we should set up is that we should only apply an update as a create if the form def specifies the If it's easiest, we could check for this even before adding the submission to the backlog. If a submission specifies an offline update to an entity that doesn't exist, and the form def doesn't allow |
If submissions about offline entity updates come in out of order, they will be put in a holding queue until the preceding submission comes in. It is possible for some submissions to get stuck indefinitely if an earlier submission in a branch gets lost. Add a mechanism where these submissions can be processed anyway.
If an entity update is applied from the queue, but the entity has not been created yet, then Central should create the entity. That can happen if the entity was created as part of the offline run, but the first change from the run has not been processed yet. If the entity update does not specify a label, then either the UUID or a fixed label (e.g., "Label unknown") should be used.
If dataset is configured for
approvalRequired
of submissions, then an entity update that is force applied should never result in a new entity. Applying an update-as-create should not happen in this case.Time frame? 1 day, 3 days, 7 days? Make configurable (for QA specifically).
The text was updated successfully, but these errors were encountered: