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

feat(reliable-integration): implement stream ID #766

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

glevco
Copy link
Contributor

@glevco glevco commented Sep 1, 2023

Depends on #763

Motivation

Implement an event stream ID so every time the event database is reset, a new ID is generated. This makes it easy for the client to know if he has to reprocess events from the beginning.

Acceptance Criteria

  • Add Stream ID generation on EventManager
  • Add save_stream_id() and get_stream_id() methods to EventStorage and its implementations
  • Reset stream ID in EventStorage.reset_events()
  • Add Stream ID to all event responses

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@glevco glevco self-assigned this Sep 1, 2023
@glevco glevco marked this pull request as ready for review September 1, 2023 22:07
jansegre
jansegre previously approved these changes Sep 4, 2023
@codecov
Copy link

codecov bot commented Sep 5, 2023

Codecov Report

Patch coverage: 82.35% and no project coverage change.

Comparison is base (a847f51) 84.74% compared to head (7108be4) 84.74%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #766   +/-   ##
=======================================
  Coverage   84.74%   84.74%           
=======================================
  Files         259      259           
  Lines       21912    21940   +28     
  Branches     2963     2964    +1     
=======================================
+ Hits        18570    18594   +24     
- Misses       2696     2701    +5     
+ Partials      646      645    -1     
Files Changed Coverage Δ
hathor/event/storage/rocksdb_storage.py 91.26% <55.55%> (-3.42%) ⬇️
hathor/event/storage/memory_storage.py 98.36% <83.33%> (-1.64%) ⬇️
hathor/event/event_manager.py 91.60% <87.50%> (-0.40%) ⬇️
hathor/event/storage/event_storage.py 100.00% <100.00%> (ø)
hathor/event/websocket/factory.py 93.10% <100.00%> (+0.24%) ⬆️
hathor/event/websocket/response.py 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

msbrogli
msbrogli previously approved these changes Sep 6, 2023
hathor/cli/events_simulator/events_simulator.py Outdated Show resolved Hide resolved
@glevco glevco force-pushed the feat/reliable-integration/decoded-outputs branch from c5172f0 to cc35384 Compare September 8, 2023 16:45
@glevco glevco force-pushed the feat/reliable-integration/stream-id branch from f5f04b0 to 728f1e7 Compare September 8, 2023 16:45
Base automatically changed from feat/reliable-integration/decoded-outputs to master September 11, 2023 01:17
@glevco glevco dismissed stale reviews from msbrogli and jansegre September 11, 2023 01:17

The base branch was changed.

@glevco glevco force-pushed the feat/reliable-integration/stream-id branch 2 times, most recently from 8a4d334 to 1a977f0 Compare September 11, 2023 15:45
@glevco glevco force-pushed the feat/reliable-integration/stream-id branch from 1a977f0 to 7108be4 Compare September 11, 2023 15:55
@glevco glevco merged commit 2ebb62f into master Sep 12, 2023
@glevco glevco deleted the feat/reliable-integration/stream-id branch September 12, 2023 04:16
This was referenced Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants