[
https://issues.apache.org/jira/browse/METRON-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16612661#comment-16612661
]
ASF GitHub Bot commented on METRON-1771:
----------------------------------------
Github user merrimanr commented on the issue:
https://github.com/apache/metron/pull/1190
The latest commit updates the various places where looking up a document
that doesn't exist returns null. Now an IOException is thrown with a helpful
message and guid of the missing object. I added tests to cover these cases. I
also added changes that will throw an exception when alerts to be add/removed
don't exist. Previously that wasn't covered and the operation would succeed
even though the missing alert wasn't added/removed.
For the parallel stream issue, I made it consistent with the rest of the
class. It now uses the same approach as the getLatest method and uses the
DocumentContainer class. As part of this I moved common code to a separate
method.
Let me know what you think about these changes.
> Update REST endpoints to support eventually consistent UI updates
> -----------------------------------------------------------------
>
> Key: METRON-1771
> URL: https://issues.apache.org/jira/browse/METRON-1771
> Project: Metron
> Issue Type: Improvement
> Reporter: Ryan Merriman
> Priority: Major
>
> Currently the REST endpoints that perform document updates either return
> true/false or nothing. This puts the responsibility of retrieving the
> updated state of the object on the client in a separate call or
> optimistically applying the changes and reverting when an update fails. This
> can be problematic if a client attempts to get the current state immediately
> after an update and the change isn't visible yet in the back end.
> Ideally they should return the updated state of the object, eliminating the
> need to look up the updated state in a separate call.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)