-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Split out state storage into separate data store. #6245
Conversation
f5c309b
to
a03c7f9
Compare
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.
these multi-thousand-line diffs are a bit unreviewable. Is there any way to split them up so that code moves are separate from changes?
@@ -39,12 +40,15 @@ class Storage(object): | |||
""" | |||
|
|||
def __init__(self, hs, stores: DataStores): | |||
self.stores = stores |
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.
is this necessary?
# We include the main data store here mainly so that we don't have to | ||
# rewrite all the existing code to split it into high vs low level | ||
# interfaces. | ||
self.main = stores.main | ||
|
||
self.persistence = EventsPersistenceStore(hs, stores) | ||
self.state = StateGroupStorage(hs, stores) |
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.
As per #6240 (comment): the inconsistency in naming between Storage and Store is... inconsistent.
Fair, I've tried to keep the massive diffs in separate commits, but let me see if I can rejig these a bit further |
Currently we always point it to the same physical database.
a03c7f9
to
2ddefcd
Compare
Ok, I'm splitting this up some more into separate PRs. |
This also includes splitting purge storage APIs into two, one that works on events and the other on state.
Based on #6240.
Commits independently reviewable.