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
Backport the psql indexer into v0.34.x #6906
Conversation
The BackportTxIndexer and BackportBlockIndexer types implement the corresponding v0.34 indexing interfaces delegated to a psql EventSink. The implementations are trivial, but we need to delegate rather than surfacing another interface because the signatures overlap.
Also update test data to be type-compatible with the old protobuf types.
b301c31
to
9740e5f
Compare
Codecov Report
@@ Coverage Diff @@
## v0.34.x #6906 +/- ##
==========================================
Coverage ? 61.51%
==========================================
Files ? 267
Lines ? 27918
Branches ? 0
==========================================
Hits ? 17173
Misses ? 9170
Partials ? 1575 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you for taking this on!!
we probably want to backport the docs as well.
Ah, good point, I didn't even think of that. Let me see about adding that to this PR. |
ecc89b1
to
b8b7b4e
Compare
Hopefully the newer analyzer will be smarter in later versions, but for now upgrading triggers a bunch of other issues with the older code.
This reverts commit 41b7182.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This change backports the PostgreSQL indexing sink, addressing part of #6828. Development on the main branch has diverged substantially since the v0.34.x release. It includes package moves, breaking API and protobuf schema changes, and new APIs, all of which together have a large footprint on the mapping between the implementation at tip and the v0.34 release branch. To avoid the need to retrofit all of those improvements, this change works by injecting the new indexing sink into the existing (v0.34) indexing interfaces by delegation. This means the backport does _not_ pull in all the newer APIs for event handling, and thus has minimal impact on existing code written against the v0.34 package structure. This change includes the test for the `psql` implementation, and thus updates some Go module dependencies. Because it does not interact with any other types, however, I did not add any unit tests to other packages in this change. Related changes: * Update module dependencies for psql backport. * Update test data to be type-compatible with the old protobuf types. * Add config settings for the PostgreSQL indexer. * Clean up some linter settings. * Hook up the psql indexer in the node main. (cherry picked from commit 8ba6d21)
Backport the psql indexer into v0.34.x (#6906)
This change backports the PostgreSQL indexing sink, addressing part of #6828.
Development on the main branch has diverged substantially since the v0.34.x release. It includes package moves, breaking API and protobuf schema changes, and new APIs, all of which together have a large footprint on the mapping between the implementation at tip and the v0.34 release branch.
To avoid the need to retrofit all of those improvements, this change works by injecting the new indexing sink into the existing (v0.34) indexing interfaces by delegation. This means the backport does not pull in all the newer APIs for event handling, and thus has minimal impact on existing code written against the v0.34 package structure.
The high-level structure of this change is:
psql
indexing sink from tip, and modify it to remove dependencies on new APIs that are not being ported.psql
sink for the existingTxIndexer
andBlockIndexer
types.psql
as an indexer type and to exposepsql-conn
. I would have chosen a better name for this setting, but I thought it would be helpful to keep the same name we use at tip.psql
indexer to be selected.This change includes the test for the
psql
implementation, and thus updates some Go module dependencies. However, because it does not interact with any other types, I did not add any unit tests to other packages in this change.