Skip to content

Commit 23c1819

Browse files
committed
Update Khepri + New fold option
1 parent 1f6b687 commit 23c1819

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ erlang_package.hex_package(
287287
erlang_package.git_package(
288288
name = "khepri",
289289
build_file = "@rabbitmq-server//bazel:BUILD.khepri",
290-
commit = "cb52d575903ddb0e0f13d2ac9ee819b046f9d598",
290+
commit = "a862938bd2927ae9b1580f914af246c3cd302a7e",
291291
repository = "rabbitmq/khepri",
292292
)
293293

deps/rabbit/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ dep_syslog = git https://github.com/schlagert/syslog 4.0.0
151151
dep_osiris = git https://github.com/rabbitmq/osiris v1.6.7
152152
dep_systemd = hex 0.6.1
153153
dep_seshat = git https://github.com/rabbitmq/seshat v0.6.1
154-
dep_khepri = git https://github.com/rabbitmq/khepri cb52d575903ddb0e0f13d2ac9ee819b046f9d598
154+
dep_khepri = git https://github.com/rabbitmq/khepri a862938bd2927ae9b1580f914af246c3cd302a7e
155155
dep_khepri_mnesia_migration = hex 0.1.1
156156

157157
define usage_xml_to_erl

deps/rabbit/src/rabbit_db_queue.erl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -994,7 +994,8 @@ delete_transient_in_khepri(FilterFun) ->
994994
false ->
995995
Acc
996996
end
997-
end, []),
997+
end, [],
998+
#{copy_tree_and_run_from_caller => true}),
998999
case Ret of
9991000
{ok, Items} ->
10001001
{QueueNames, Deletions} = lists:unzip(Items),

deps/rabbit/src/rabbit_khepri.erl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
adv_create/2,
3333
update/2,
3434
cas/3,
35-
fold/3,
35+
fold/3, fold/4,
3636
foreach/2,
3737
filter/2,
3838

@@ -668,7 +668,11 @@ cas(Path, Pattern, Data) ->
668668
khepri:compare_and_swap(
669669
?STORE_ID, Path, Pattern, Data, ?DEFAULT_COMMAND_OPTIONS).
670670

671-
fold(Path, Pred, Acc) -> khepri:fold(?STORE_ID, Path, Pred, Acc).
671+
fold(Path, Pred, Acc) ->
672+
khepri:fold(?STORE_ID, Path, Pred, Acc).
673+
674+
fold(Path, Pred, Acc, Options) ->
675+
khepri:fold(?STORE_ID, Path, Pred, Acc, Options).
672676

673677
foreach(Path, Pred) -> khepri:foreach(?STORE_ID, Path, Pred).
674678

0 commit comments

Comments
 (0)