jaydoane commented on code in PR #5514:
URL: https://github.com/apache/couchdb/pull/5514#discussion_r2056651779
##########
src/couch/src/couch_util.erl:
##########
@@ -862,3 +863,16 @@ ejson_to_map({Val}) when is_list(Val) ->
maps:from_list(lists:map(fun({K, V}) -> {K, ejson_to_map(V)} end, Val));
ejson_to_map(Val) ->
Val.
+
+% Set types were switched to version 2 by default in OTP 28, use this helper to
+% create version 2 sets in OTP versions < 28 as well to avoid having to deal
+% with a different ordered to_list result in tests and just ensure we always
+% use version 2, which is also more performant
+%
+% Remove after OTP >= 28 and switch to plain sets:new/0 and sets:from_list/1
+
Review Comment:
You could DRY this out a little:
```suggestion
-define(V2, {version, 2}).
```
--
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]