metron-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (METRON-1771) Update REST endpoints to support eventually consistent UI updates
Date Fri, 07 Sep 2018 21:23:00 GMT


ASF GitHub Bot commented on METRON-1771:

Github user merrimanr commented on a diff in the pull request:
    --- Diff: metron-platform/metron-indexing/src/main/java/org/apache/metron/indexing/dao/
    @@ -121,20 +131,30 @@ public void addCommentToAlert(CommentAddRemoveRequest request, Document
         if (exceptions.size() > 0) {
           throw new IOException(Joiner.on("\n").join(exceptions));
    +    return newVersions.get(0);
    --- End diff --
    Here we are collecting each updated document in a list.  In theory they are all the same
so it shouldn't matter which one we return.  Is there a better way to do this?  

> Update REST endpoints to support eventually consistent UI updates
> -----------------------------------------------------------------
>                 Key: METRON-1771
>                 URL:
>             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

View raw message