mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-26 12:16:12 +00:00
Remove state replication stream
This commit is contained in:
parent
c7f665d700
commit
3e784eff74
@ -40,7 +40,6 @@ STREAM_NAMES = (
|
|||||||
("backfill",),
|
("backfill",),
|
||||||
("push_rules",),
|
("push_rules",),
|
||||||
("pushers",),
|
("pushers",),
|
||||||
("state",),
|
|
||||||
("caches",),
|
("caches",),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -130,7 +129,6 @@ class ReplicationResource(Resource):
|
|||||||
backfill_token = yield self.store.get_current_backfill_token()
|
backfill_token = yield self.store.get_current_backfill_token()
|
||||||
push_rules_token, room_stream_token = self.store.get_push_rules_stream_token()
|
push_rules_token, room_stream_token = self.store.get_push_rules_stream_token()
|
||||||
pushers_token = self.store.get_pushers_stream_token()
|
pushers_token = self.store.get_pushers_stream_token()
|
||||||
state_token = self.store.get_state_stream_token()
|
|
||||||
caches_token = self.store.get_cache_stream_token()
|
caches_token = self.store.get_cache_stream_token()
|
||||||
|
|
||||||
defer.returnValue(_ReplicationToken(
|
defer.returnValue(_ReplicationToken(
|
||||||
@ -142,7 +140,7 @@ class ReplicationResource(Resource):
|
|||||||
backfill_token,
|
backfill_token,
|
||||||
push_rules_token,
|
push_rules_token,
|
||||||
pushers_token,
|
pushers_token,
|
||||||
state_token,
|
0, # State stream is no longer a thing
|
||||||
caches_token,
|
caches_token,
|
||||||
))
|
))
|
||||||
|
|
||||||
@ -191,7 +189,6 @@ class ReplicationResource(Resource):
|
|||||||
yield self.receipts(writer, current_token, limit, request_streams)
|
yield self.receipts(writer, current_token, limit, request_streams)
|
||||||
yield self.push_rules(writer, current_token, limit, request_streams)
|
yield self.push_rules(writer, current_token, limit, request_streams)
|
||||||
yield self.pushers(writer, current_token, limit, request_streams)
|
yield self.pushers(writer, current_token, limit, request_streams)
|
||||||
yield self.state(writer, current_token, limit, request_streams)
|
|
||||||
yield self.caches(writer, current_token, limit, request_streams)
|
yield self.caches(writer, current_token, limit, request_streams)
|
||||||
self.streams(writer, current_token, request_streams)
|
self.streams(writer, current_token, request_streams)
|
||||||
|
|
||||||
@ -365,25 +362,6 @@ class ReplicationResource(Resource):
|
|||||||
"position", "user_id", "app_id", "pushkey"
|
"position", "user_id", "app_id", "pushkey"
|
||||||
))
|
))
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
|
||||||
def state(self, writer, current_token, limit, request_streams):
|
|
||||||
current_position = current_token.state
|
|
||||||
|
|
||||||
state = request_streams.get("state")
|
|
||||||
|
|
||||||
if state is not None:
|
|
||||||
state_groups, state_group_state = (
|
|
||||||
yield self.store.get_all_new_state_groups(
|
|
||||||
state, current_position, limit
|
|
||||||
)
|
|
||||||
)
|
|
||||||
writer.write_header_and_rows("state_groups", state_groups, (
|
|
||||||
"position", "room_id", "event_id"
|
|
||||||
))
|
|
||||||
writer.write_header_and_rows("state_group_state", state_group_state, (
|
|
||||||
"position", "type", "state_key", "event_id"
|
|
||||||
))
|
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def caches(self, writer, current_token, limit, request_streams):
|
def caches(self, writer, current_token, limit, request_streams):
|
||||||
current_position = current_token.caches
|
current_position = current_token.caches
|
||||||
|
Loading…
Reference in New Issue
Block a user