-
Notifications
You must be signed in to change notification settings - Fork 503
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
Update ingest/change_compactor with extended Change struct #5540
Comments
@chowbao It would be helpful for my understanding if you could explain how these new fields can be used (with an example?). Thanks! |
Of course So in stellar-etl we would use the changes to add new columns to some of our tables. For example, our stellar-etl currently has this flow in the code if that helps clear things up as well
By also passing new fields like |
We will copy and modify the changeCompactor for stellar-etl only within go/stellar-etl The changeCompactor within the stellar/go/ingest will not be changed |
Related to #5535
The change_compactor should be updated to use the new fields in the Change struct
New fields:
None of the existing
Type, Pre, Post
field logic needs to be changed.The compacted changes from
AddChange(change Change)
should take the most recent fields from above if there is already an existing change forc.cache[ledgerKeyString]
For example in https://github.com/stellar/go/blob/master/ingest/change_compactor.go#L152-L166
Alternatively instead of propagating the latest
Change.Reason/OperationIndex/etc...
toc.cache[ledgerKeyString] = Change{}
it is possible to keep theexistingChange.Reason/OperationIndex/etc...
instead ofchange.Reason/OperationIndex/etc...
. This would be the less preferred option from stellar-etlThe text was updated successfully, but these errors were encountered: