diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e3db36395555..ed1aedcbc62e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -74,10 +74,8 @@ set(REFLEX "${THIRD_PARTY_LIB_DIR}/reflex/bin/reflex") add_third_party( jsoncons GIT_REPOSITORY https://github.com/dragonflydb/jsoncons - # URL https://github.com/danielaparker/jsoncons/archive/refs/tags/v0.171.1.tar.gz - GIT_TAG Dragonfly + GIT_TAG Dragonfly.178 GIT_SHALLOW 1 - # PATCH_COMMAND patch -p1 -i "${CMAKE_SOURCE_DIR}/patches/jsoncons-v0.171.0.patch" CMAKE_PASS_FLAGS "-DJSONCONS_BUILD_TESTS=OFF -DJSONCONS_HAS_POLYMORPHIC_ALLOCATOR=ON" LIB "none" ) diff --git a/src/server/json_family.cc b/src/server/json_family.cc index 19172d503972..993a853c4db3 100644 --- a/src/server/json_family.cc +++ b/src/server/json_family.cc @@ -1326,14 +1326,13 @@ OpResult OpSet(const OpArgs& op_args, string_view key, string_view path, bool path_exists = false; bool operation_result = false; const JsonType& new_json = parsed_json.value(); - auto cb = [&](std::optional, JsonType* val) -> MutateCallbackResult<> { + + auto cb = [&](std::optional, JsonType* val) -> MutateCallbackResult<> { path_exists = true; if (!is_nx_condition) { operation_result = true; - static_assert( - std::is_same_v::propagate_on_container_copy_assignment, - std::false_type>); - *val = new_json; + *val = + JsonType(new_json, std::pmr::polymorphic_allocator{CompactObj::memory_resource()}); } return {}; };