iilyak commented on code in PR #5603:
URL: https://github.com/apache/couchdb/pull/5603#discussion_r2222729525
##########
src/fabric/src/fabric.erl:
##########
@@ -185,6 +194,25 @@ set_security(DbName, SecObj) ->
set_security(DbName, SecObj, Options) ->
fabric_db_meta:set_security(dbname(DbName), SecObj, opts(Options)).
+%% @doc reset the time seq data structure
+-spec set_time_seq(dbname(), any()) -> ok.
Review Comment:
To avoid using `any()` here you can.
1. add `-opaque time_seq() :: couch_time_seq:time_seq().` in
`couch/include/couch_db.hrl`
2. add following types in `couch_time_seq.erl`
```
-export_type([
time_seq/0
]).
-type bin() :: {epoch(), update_seq()}.
-type time_seq() :: #{
v => pos_integer(),
bins => [bin()]
}.
```
You might need to define `update_seq()` and `epoch()` types as well (I
assumed something like that exist already but I didn't check naming).
The `opaque` types are designed to avoid abstraction leaking and meant be
used to define interfaces between different components.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]