It depends on your specific application, but if you are modifying specific
rows based on an index you can do fields grouping by that index so that
only one bolt will ever update a particular row.


On Mon, Apr 28, 2014 at 6:40 PM, Raphael Hsieh <[email protected]> wrote:

> How does Storm handle multiple writers writing data to an external
> datastore ? If there are multiple workers working to process the data, each
> of them must also do the "write" to the database. If there are multiple
> writers to the database that are storing data, how does it make sure that
> the writers don't overwrite each others data ?
>
> I understand that it will read from the datastore first and check the
> batchTxId. However, if two writers look at a previous batchID, lets pretend
> it's 26.
> Now batch 27 and 28 want to write a continued aggregate data. 27
> increments on 26. 28 increments on 26. 27 writes first, then 28. However,
> 28 did not aggregate on top of 27's aggregate, and hence the final data in
> the datastore is wrong.
>
> How does storm handle this ?
>
> --
> Raphael Hsieh
>
>
>
>

Reply via email to