-
Notifications
You must be signed in to change notification settings - Fork 649
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
Store some data in ES as objects instead of just as strings #2565
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 tasks
abitmore
changed the title
Store some data in ES as objects rather than strings
Store some data in ES as objects instead of just as strings
Dec 24, 2021
2 tasks
17 tasks
Kudos, SonarCloud Quality Gate passed! |
This was referenced Dec 26, 2021
17 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR for #2380 and #1400.
The strings are kept for backward compatibility. The objects are stored redundantly in new fields with name
(old_field_name)_object
. The affected fields are listed below.[ { "key_(type)": k, "data_(type)": d } , ... ]
, where(type)
can beint
,bool
,string
orobject
. The fields are:account_auths
inaccount_object
and related operationsaddress_auths
inaccount_object
and related operationskey_auths
inaccount_object
and related operationsfeeds
inasset_bitasset_data_object
acceptable_collateral
incredit_offer_object
and related operationsacceptable_borrowers
incredit_offer_object
and related operationsstatic_variant
s are stored as{ "which": w, "data_(type)" : d }
, where(type)
can beint
,bool
,string
orobject
. The fields are:op
inproposal_create_operation.proposed_ops
initializer
inworker_create_operation
policy
investing_balance_create_operation
and etcactive_special_authority
inaccount_object
and related operationsowner_special_authority
inaccount_object
and related operationshtlc_preimage_hash
inhtlc_create_operation
argument
inrestriction
class, used in custom authority operations (added in Adaptrestriction::argument
as an object for ES #2681)operation_result
static_variant
arrays are stored as object arrays, including:parameters
incommittee_update_chain_parameters_operation.**.current_fees
proposed_ops
inproposal_create_operation
operations
inproposal_object
predicates
inassert_operation
Note: more disk space is required for ES to store the redundant data. Here is some data for comparison.
BTW #2568 is the next work to be done.