You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System.ArgumentException: A JsonNode cannot be used as a value. (Parameter 'value')
at System.Text.Json.ThrowHelper.ThrowArgumentException_NodeValueNotAllowed(String paramName)
at System.Text.Json.Nodes.JsonValue`1..ctor(TValue value, Nullable`1 options)
at System.Text.Json.Nodes.JsonValue.Create[T](T value, Nullable`1 options)
at System.Text.Json.Nodes.JsonNode.ReplaceWith[T](T value)
at GarnetJSON.JsonObject.Set(String path, String value) in /Users/ercjul/source/garnet/playground/GarnetJSON/JsonObject.cs:line 235
at GarnetJSON.JsonObject.TrySet(String path, String value, ILogger logger) in /Users/ercjul/source/garnet/playground/GarnetJSON/JsonObject.cs:line 163
at GarnetJSON.JsonSET.Updater(ReadOnlyMemory`1 key, ObjectInput& input, IGarnetObject jsonObject, ValueTuple`2& output, RMWInfo& rmwInfo) in /Users/ercjul/source/garnet/playground/GarnetJSON/JsonCommands.cs:line 29
at Garnet.server.ObjectSessionFunctions.InPlaceUpdaterWorker(Byte[]& key, ObjectInput& input, IGarnetObject& value, GarnetObjectStoreOutput& output, RMWInfo& rmwInfo, Int64& sizeChange) in /Users/ercjul/source/garnet/libs/server/Storage/Functions/ObjectStore/RMWMethods.cs:line 161
at Garnet.server.ObjectSessionFunctions.InPlaceUpdater(Byte[]& key, ObjectInput& input, IGarnetObject& value, GarnetObjectStoreOutput& output, RMWInfo& rmwInfo, RecordInfo& recordInfo) in /Users/ercjul/source/garnet/libs/server/Storage/Functions/ObjectStore/RMWMethods.cs:line 84
at Garnet.server.StorageSession.RMW_ObjectStore[TObjectContext](Byte[]& key, ObjectInput& input, GarnetObjectStoreOutput& output, TObjectContext& objectStoreContext) in /Users/ercjul/source/garnet/libs/server/Storage/Session/ObjectStore/AdvancedOps.cs:line 17
at Garnet.server.GarnetApi`2.RMW_ObjectStore(Byte[]& key, ObjectInput& input, GarnetObjectStoreOutput& output) in /Users/ercjul/source/garnet/libs/server/API/GarnetApi.cs:line 290
at Garnet.server.RespServerSession.TryCustomObjectCommand[TGarnetApi](GarnetObjectType objType, Byte subid, CommandType type, TGarnetApi& storageApi) in /Users/ercjul/source/garnet/libs/server/Custom/CustomRespCommands.cs:line 152
at Garnet.server.RespServerSession.NetworkCustomObjCmd[TGarnetApi](TGarnetApi& storageApi) in /Users/ercjul/source/garnet/libs/server/Resp/RespServerSession.cs:line 843
at Garnet.server.RespServerSession.ProcessOtherCommands[TGarnetApi](RespCommand command, TGarnetApi& storageApi) in /Users/ercjul/source/garnet/libs/server/Resp/RespServerSession.cs:line 746
at Garnet.server.RespServerSession.ProcessArrayCommands[TGarnetApi](RespCommand cmd, TGarnetApi& storageApi) in /Users/ercjul/source/garnet/libs/server/Resp/RespServerSession.cs:line 707
at Garnet.server.RespServerSession.ProcessMessages() in /Users/ercjul/source/garnet/libs/server/Resp/RespServerSession.cs:line 446
at Garnet.server.RespServerSession.TryConsumeMessages(Byte* reqBuffer, Int32 bytesReceived) in /Users/ercjul/source/garnet/libs/server/Resp/RespServerSession.cs:line 321
I don't known why,but I upgrade System.Text.Json from 8.0.5 to 9.0.0 will fix this
Steps to reproduce the bug
clone this code
run unit test Garnet.test.JsonCommandsTest.JsonSetGetTests
Describe the bug
run the unit test will failed
https://github.com/microsoft/garnet/blob/main/test/Garnet.test/GarnetJSON/JsonCommandsTest.cs#L73-L73
db.Execute("JSON.SET", "k1", "$..a", 3);
the garnet server will throw Exception
https://github.com/microsoft/garnet/blob/main/playground/GarnetJSON/JsonObject.cs#L235-L235
matchValue.ReplaceWith(valNode);
Exception describe:
I don't known why,but I upgrade
System.Text.Json
from8.0.5
to9.0.0
will fix thisSteps to reproduce the bug
Garnet.test.JsonCommandsTest.JsonSetGetTests
Expected behavior
unit test failed and report
Screenshots
No response
Release version
No response
IDE
JetBrains Rider 2024.3.3
OS version
System: MacOS 15.2 (24C101)
Cpu: M1 MAX
Additional context
No response
The text was updated successfully, but these errors were encountered: