[openstack-dev] [Panko] Ways to go through events in the order they appear in database
Mikhail Kebich
mikhail.kebich at gmail.com
Wed Sep 6 10:08:29 UTC 2017
On Tue, Sep 5, 2017 at 9:27 PM, gordon chung <gord at live.ca> wrote:
> i imagine if we were to support the ability to see event3 even if the
> marker is event4, we'd need to do what Jay suggested, and add a
> recorded_at/created_at field. supporting sorting by id as i previously
> suggested is probably not a great idea since id is implementation details.
It is a good option. Just a note that in a case of multiple concurrent
transactions we can't guarantee that events will appear in database in
order of recorded_at timestamp. Assume we have two concurrent
transactions tx1 and tx2 with the recorded_at1 < recorded_at2, in this
case tx2 can be committed earlier than tx1. However the same is true
for auto-incremented number in general case.
Regards,
Mike
More information about the OpenStack-dev
mailing list