anchor.diff:  %%--------------------------------------------------------------------
   -spec state_put(Key :: term(), Value :: term()) -> ok.
   state_put(Key, Value) ->
  -    ?error("qqqqq2 ~p", [{Key, Value}]),
       {ok, _} = dbsync_state:save(#document{key = Key, value = #dbsync_state{entry = Value}}),
  -    ?error("qqqqq3 ~p", [{Key, Value}]),
       ok.
   
   %%--------------------------------------------------------------------
  
positive.code:                 fun(SpaceId, #batch{until = Until} = B) ->
                      spawn(fun() -> dbsync_proto:send_batch(QueueKey, SpaceId, B) end),
                      set_current_seq(oneprovider:get_provider_id(), SpaceId, Until),
                      ?info("[ DBSync ] mmmmm3 ~p", [{QueueKey, B}]),
                      case QueueKey of
                          global -> state_put(global_resume_seq, max(Until, OldSeq));
                          _ -> ok
  
negative.code:     DBSyncPid = whereis(?MODULE),
      case self() of
          DBSyncPid ->
              DoUpdate();
          _ ->
              datastore:run_synchronized(dbsync_state, term_to_binary(Key), DoUpdate)
      end.
  
  