You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by Michael Schiff <sc...@gmail.com> on 2015/04/14 01:22:34 UTC

Opaque State updates

Hey everyone,

I am trying to diagnose an issue with Opaque State updates. The commit from
2/17/13: (c876e71) Fix TransactionalMap and OpaqueMap to correctly do
multiple updates to the same key in the same batch, is partially tested in
the following snippet from state_test.clj

    (.beginCommit map 1)
    (is (= nil (single-get map "a")))
    ;; tests that intra-batch caching works
    (is (= 1 (single-update map "a" 1)))
    (is (= 1 (single-get map "a")))
    (is (= 3 (single-update map "a" 2)))
    (is (= 3 (single-get map "a")))
    (.commit map 1)

This seems to imply that StateUpdater.updateState will potentially be
called more than once per transaction. However, looking at
PartitonPersistProcessor.finishBatch makes it seem as though this will
never happen. Is anybody aware of a case in which it is expected for
StateUpdater.updateState to be called more than once per transaction?