feat(ds): allow to turn monotonic timestamps off for DB
That tells implementation how to assign timestamps to messages. Current implicit default is now `force_monotonic_timestamps => true`.
This commit is contained in:
parent
ffa69df6f8
commit
ae3812da85
|
@ -151,7 +151,6 @@ ensure_monotonic_timestamp(ShardId) ->
|
||||||
%%================================================================================
|
%%================================================================================
|
||||||
|
|
||||||
-record(s, {}).
|
-record(s, {}).
|
||||||
-define(timer_update, timer_update).
|
|
||||||
|
|
||||||
init([]) ->
|
init([]) ->
|
||||||
process_flag(trap_exit, true),
|
process_flag(trap_exit, true),
|
||||||
|
|
|
@ -169,6 +169,13 @@
|
||||||
-type generic_db_opts() ::
|
-type generic_db_opts() ::
|
||||||
#{
|
#{
|
||||||
backend := atom(),
|
backend := atom(),
|
||||||
|
%% Force strictly monotonic message timestamps.
|
||||||
|
%% Default: `true'.
|
||||||
|
%% Messages are assigned unique, strictly monotonically increasing timestamps.
|
||||||
|
%% Those timestamps form a total order per each serialization key.
|
||||||
|
%% If `false' then message timestamps are respected; timestamp, topic and
|
||||||
|
%% serialization key uniquely identify a message.
|
||||||
|
force_monotonic_timestamps => boolean(),
|
||||||
serialize_by => clientid | topic,
|
serialize_by => clientid | topic,
|
||||||
_ => _
|
_ => _
|
||||||
}.
|
}.
|
||||||
|
|
Loading…
Reference in New Issue