Describe the bug
When creating memory concurrently, there is a high probability of creating duplicate memories, such as those with the same user_id or document.

Environment
0.3.0
Fast reproduce steps
1、Create a Lua script file
vim create_memory.lua
counter = 0
request = function()
counter = counter + 1
wrk.method = "POST"
wrk.body = '{"content":"Alice likes coffee","user_id":"user' .. counter .. '","agent_id":"agent1","run_id":"run1","metadata":{"key":"value"},"infer":true}'
wrk.headers["X-API-Key"] = "key1"
wrk.headers["Content-Type"] = "application/json"
return wrk.format(nil)
end
2、Use wrk to call Lua scripts for concurrent testing
wrk -t4 -c50 -d1s -s create_memory.lua http://localhost:8000/api/v1/memories
Expected behavior
No repetitive memorization
Actual behavior
No response
Additional context
No response