Skip to content

Commit

Permalink
fix: JSON.MSET command (#3459)
Browse files Browse the repository at this point in the history
  • Loading branch information
BorysTheDev authored Aug 6, 2024
1 parent ff716bb commit 070e7b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/server/json_family.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2233,7 +2233,8 @@ void JsonFamily::Get(CmdArgList args, ConnectionContext* cntx) {
// TODO: Add sensible defaults/categories to json commands

void JsonFamily::Register(CommandRegistry* registry) {
constexpr size_t kMsetFlags = CO::WRITE | CO::DENYOOM | CO::FAST | CO::INTERLEAVED_KEYS;
constexpr size_t kMsetFlags =
CO::WRITE | CO::DENYOOM | CO::FAST | CO::INTERLEAVED_KEYS | CO::NO_AUTOJOURNAL;
registry->StartFamily();
*registry << CI{"JSON.GET", CO::READONLY | CO::FAST, -2, 1, 1, acl::JSON}.HFUNC(Get);
*registry << CI{"JSON.MGET", CO::READONLY | CO::FAST, -3, 1, -2, acl::JSON}.HFUNC(MGet);
Expand Down
4 changes: 1 addition & 3 deletions tests/dragonfly/replication_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1972,7 +1972,6 @@ async def test_heartbeat_eviction_propagation(df_factory):
await disconnect_clients(c_master, *[c_replica])


@pytest.mark.skip(reason="Test is flaky")
@pytest.mark.asyncio
async def test_policy_based_eviction_propagation(df_factory, df_seeder_factory):
master = df_factory.create(
Expand Down Expand Up @@ -2005,8 +2004,7 @@ async def test_policy_based_eviction_propagation(df_factory, df_seeder_factory):
keys_master = await c_master.execute_command("keys k*")
keys_replica = await c_replica.execute_command("keys k*")

assert len(keys_master) == len(keys_replica)
assert set(keys_master) == set(keys_replica)
assert set(keys_replica).difference(keys_master) == set()

await disconnect_clients(c_master, *[c_replica])

Expand Down

0 comments on commit 070e7b0

Please sign in to comment.