incubator-blur-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron McCurry <amccu...@gmail.com>
Subject Re: RowMutationType.UPDATE_ROW with non-existant rowId
Date Thu, 04 Jun 2015 21:24:42 GMT
On Wed, Jun 3, 2015 at 10:11 PM, Tom Hood <tom.w.hood@gmail.com> wrote:

> Hi,
>
> I'm using blur 0.2.4 and I expected to get a BlurException from
> Iface.mutate when mutating a row whose rowId does not exist.  The type of
> mutation was:
>
> RowMutationType = UPDATE_ROW
> RecordMutationType = REPLACE_ENTIRE_RECORD
>
> Instead of an exception, the row was added.  Is the code working as
> intended and the RowMutationType.UPDATE_ROW javadoc is out of date or is it
> a bug?
>

Currently it is behaving as expected.  The idea for UPDATE_ROW was to
change allow changes of the records within a row without having to fetch
the entire row for a row replace.  So we chose to allow the row to be added
during a row update when it's not already present without error as to avoid
the round trip with an error.

If the round trip were to occur and the client were to resubmit with the
row mutation type set to replace row data could be deleted.  If there are
two clients both perform replace rows mutations on the same row the last
one wins.  If both perform row updates on the same row with different
records both records would be present after both mutations are complete.

Hope that explains why the system behaves the way it does.

Thanks!
Aaron


>
> Thanks,
> -- Tom
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message