Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: switch json object to pmr allocator #2483

Merged
merged 2 commits into from
Jan 26, 2024
Merged

chore: switch json object to pmr allocator #2483

merged 2 commits into from
Jan 26, 2024

Conversation

romange
Copy link
Collaborator

@romange romange commented Jan 26, 2024

  1. Move json object creation code to the shard-thread inside rdb_load
  2. Now json_family never references "json" type, always dfly::JsonType
  3. Switch JsonType to pmr::json.
  4. Make sure we pass the correct memory_resource when creating json object from string.

1. Move json object creation code to the shard-thread inside rdb_load
2. Now json_family never references "json" type, always dfly::JsonType
3. Switch JsonType to pmr::json.
4. Make sure we pass the correct memory_resource when creating json object from string.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
@romange romange requested a review from dranikpg January 26, 2024 07:30
dranikpg
dranikpg previously approved these changes Jan 26, 2024
src/server/json_family.cc Outdated Show resolved Hide resolved
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
@romange romange merged commit ea59559 into main Jan 26, 2024
10 checks passed
@romange romange deleted the JsonMemory branch January 26, 2024 10:47
romange added a commit that referenced this pull request Feb 4, 2024
* chore: switch json object to pmr allocator

1. Move json object creation code to the shard-thread inside rdb_load
2. Now json_family never references "json" type, always dfly::JsonType
3. Switch JsonType to pmr::json.
4. Make sure we pass the correct memory_resource when creating json object from string.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants