-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add getEvents backed by DB #215
Merged
Merged
Changes from 38 commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
0a7e05a
Ingest events into DB
psheth9 9fa8c2a
Update tests
psheth9 4cc58b9
Update tests
psheth9 3940d27
Fix tests
psheth9 4d0c280
Ignore ingestion when events are empty
psheth9 4f68a35
Add getEvents backed by DB
psheth9 9519aa2
Refactor getEvents to call fetch events from db
psheth9 133ef97
Remove in-memory events store
psheth9 c52f618
Make use of cursor in pagination and combine filters
psheth9 2a6435d
Update scan function logic in order to test
psheth9 5c5b407
Move NewTestDb util
psheth9 a566923
Trim events db and remove eventTypes in SELECT query as event types a…
psheth9 c70c9e4
Introduce cursor range and add logs for latency
psheth9 e86cebc
remove event memory store
psheth9 4d809d2
Merge branch 'events-db-backend' into refactor-get-events
psheth9 a3f8987
remove event memory store from latest merge
psheth9 1a03730
Fix lint issues part 1
psheth9 6551dc1
Fix lint issues part 2
psheth9 7ac1ece
Fix more lint and add ledger range code for events
psheth9 768e657
Update eventHandler mock
psheth9 d3c913c
Fix 2 major errors in tests: nil pointer reference and unknown hash
psheth9 4326883
Fix contract Id filter logic and add cursor set to avoid duplicates
psheth9 a4f3d6a
Validate requested start ledger with stored ledger range
psheth9 2c35f60
Fix lint error part 4
psheth9 9783797
Add migration for events table
psheth9 73ca500
Fix lint error part 5
psheth9 3b9ce34
Fix lint error part 6
psheth9 814b6ae
Address review comments pt1
psheth9 f3c9461
Make contract id a blob type
psheth9 5709a8f
Remove events package and move cursor.go to db package
psheth9 a28b57f
Fix lint error part 6
psheth9 952c0e3
Fix lint error part 7
psheth9 263e6f7
Optimize migration code
psheth9 3abf97d
Merge branch 'events-db-backend' into refactor-get-events
psheth9 88f3dfb
Introduce endLedger and remove Cursor id from schema
psheth9 1bab126
Merge branch 'events-db-backend' into refactor-get-events
psheth9 eceb767
Use LedgerReader to get Ledger Range in events
psheth9 115c32a
Fix lint errors
psheth9 289aa93
Add benchmark for testing various load parameter
psheth9 50ca152
update benchmark
psheth9 7b9934b
Comment benchmark events
psheth9 c849a1e
Merge branch 'events-db-backend' into refactor-get-events
psheth9 3506b41
Reduce allocs pt1
psheth9 c431913
Benchmark with 30 million events
psheth9 818cd20
Refactor getEvents to backed only by Events table
psheth9 2c7ffa4
change test db path
psheth9 b269134
Use Binary encoding for saving events into DB
psheth9 f5ea54e
Correct number of topics
psheth9 12f7790
reduce events in benchmark so that tests run
psheth9 b9e5f42
update events schema
psheth9 215e6c4
Fix topic count
psheth9 a6d35ae
Fix fetch query to not stop if null topic
psheth9 905eaf0
Fix lint pt1
psheth9 4b8726b
Fix trimEvents and lint errors
psheth9 8b28d65
update log info
psheth9 051ab4f
Fix more lint errors
psheth9 f284c9e
Fix more lint errors pt 11
psheth9 9c7e870
Fix format in error
psheth9 52bdf24
Fix linter error pt 12
psheth9 99d5411
Add nolint for GetEvents as a temp fix.
psheth9 7466e54
Add events table migration (#262)
aditya1702 8e33b1e
Address review comments
psheth9 7d47427
Store binary of topics instead of string
psheth9 435b7e0
Unify min/max topic count in event.go
psheth9 4f7b675
Address review comments for event Types and fix unit tests
psheth9 1fbd381
cleanup
psheth9 187e9d6
Fix linter errors for one last time
psheth9 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
2 changes: 1 addition & 1 deletion
2
...oroban-rpc/internal/events/cursor_test.go → cmd/soroban-rpc/internal/db/cursor_test.go
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package events | ||
package db | ||
|
||
import ( | ||
"encoding/json" | ||
|
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Separate question, cc @2opremio: should we bother with letting these be different? Or even configurable?