AWRS toSequenceNr

5 views
Skip to first unread message

ddevore

unread,
Mar 27, 2013, 2:22:32 PM3/27/13
to eventsou...@googlegroups.com
Martin,

I want to make sure I understand the purpose of toSequenceNr for the Replayer. In AWRS (asyncResequence...) its counter - 1L, essentially the current stored counter - 1. So my initial thought was that it had to do with re-sequencing the asynchronous replay's. But in looking at the HBaseJournal it looks like its being used specifically for HBaseClient scans as well as limiting the number of events stored in memory). With SWRS essentially >= is used for replay's and I want to make sure I'm implementing AWRS correctly.

Cheers,

Duncan

The preceding email message may contain confidential information of Viridity Energy, Inc. It is not intended for transmission to, or receipt by, any unauthorized persons. If you have received this message in error, please (i) do not read it, (ii) reply to the sender that you received the message in error, and (iii) erase or destroy the message.

Martin Krasser

unread,
Mar 27, 2013, 2:48:47 PM3/27/13
to eventsou...@googlegroups.com
Hi Duncan,

a replay may trigger concurrent writes (i.e. writes that occur while the replay is running e.g. when a replayed messages causes another message to be emitted to another processor via a channel for which no ack exists yet, just to mention one possible scenario). In order to avoid that newly written input messages are replayed by the currently running replay, an upper sequence number (toSequenceNr) must be set. Any newly written message will have a sequence number >= counter, so a replay must be limited up to sequence number counter-1. This is similar to taking a snapshot of a data store for reading. LevelDB, for example supports snapshots natively, but others like HBase does not, hence this AWRS-level mechanism.

Cheers,
Martin

Am 27.03.13 19:22, schrieb ddevore:

ddevore

unread,
Mar 27, 2013, 4:39:24 PM3/27/13
to eventsou...@googlegroups.com, kras...@googlemail.com
Hi Martin,

Okay now I understand.

Thanks!
Reply all
Reply to author
Forward
0 new messages