prevent race condition in barrel_local_changes
prevent race condition in barrel_local_changes

register first to events before starting to retrieve the initial changes.

barrel-db/platform,barrel-db/platform,barrel-db/platform,barrel-db/platform,barrel-db/platform,barrel-db/platform