Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
784a2d4f
Commit
784a2d4f
authored
8 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Remove broken cache stuff
parent
0be96347
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
synapse/app/pusher.py
+0
-16
0 additions, 16 deletions
synapse/app/pusher.py
synapse/app/synchrotron.py
+0
-5
0 additions, 5 deletions
synapse/app/synchrotron.py
with
0 additions
and
21 deletions
synapse/app/pusher.py
+
0
−
16
View file @
784a2d4f
...
@@ -80,11 +80,6 @@ class PusherSlaveStore(
...
@@ -80,11 +80,6 @@ class PusherSlaveStore(
DataStore
.
get_profile_displayname
.
__func__
DataStore
.
get_profile_displayname
.
__func__
)
)
# XXX: This is a bit broken because we don't persist forgotten rooms
# in a way that they can be streamed. This means that we don't have a
# way to invalidate the forgotten rooms cache correctly.
# For now we expire the cache every 10 minutes.
BROKEN_CACHE_EXPIRY_MS
=
60
*
60
*
1000
who_forgot_in_room
=
(
who_forgot_in_room
=
(
RoomMemberStore
.
__dict__
[
"
who_forgot_in_room
"
]
RoomMemberStore
.
__dict__
[
"
who_forgot_in_room
"
]
)
)
...
@@ -168,7 +163,6 @@ class PusherServer(HomeServer):
...
@@ -168,7 +163,6 @@ class PusherServer(HomeServer):
store
=
self
.
get_datastore
()
store
=
self
.
get_datastore
()
replication_url
=
self
.
config
.
worker_replication_url
replication_url
=
self
.
config
.
worker_replication_url
pusher_pool
=
self
.
get_pusherpool
()
pusher_pool
=
self
.
get_pusherpool
()
clock
=
self
.
get_clock
()
def
stop_pusher
(
user_id
,
app_id
,
pushkey
):
def
stop_pusher
(
user_id
,
app_id
,
pushkey
):
key
=
"
%s:%s
"
%
(
app_id
,
pushkey
)
key
=
"
%s:%s
"
%
(
app_id
,
pushkey
)
...
@@ -220,21 +214,11 @@ class PusherServer(HomeServer):
...
@@ -220,21 +214,11 @@ class PusherServer(HomeServer):
min_stream_id
,
max_stream_id
,
affected_room_ids
min_stream_id
,
max_stream_id
,
affected_room_ids
)
)
def
expire_broken_caches
():
store
.
who_forgot_in_room
.
invalidate_all
()
next_expire_broken_caches_ms
=
0
while
True
:
while
True
:
try
:
try
:
args
=
store
.
stream_positions
()
args
=
store
.
stream_positions
()
args
[
"
timeout
"
]
=
30000
args
[
"
timeout
"
]
=
30000
result
=
yield
http_client
.
get_json
(
replication_url
,
args
=
args
)
result
=
yield
http_client
.
get_json
(
replication_url
,
args
=
args
)
now_ms
=
clock
.
time_msec
()
if
now_ms
>
next_expire_broken_caches_ms
:
expire_broken_caches
()
next_expire_broken_caches_ms
=
(
now_ms
+
store
.
BROKEN_CACHE_EXPIRY_MS
)
yield
store
.
process_replication
(
result
)
yield
store
.
process_replication
(
result
)
poke_pushers
(
result
)
poke_pushers
(
result
)
except
:
except
:
...
...
This diff is collapsed.
Click to expand it.
synapse/app/synchrotron.py
+
0
−
5
View file @
784a2d4f
...
@@ -75,11 +75,6 @@ class SynchrotronSlavedStore(
...
@@ -75,11 +75,6 @@ class SynchrotronSlavedStore(
BaseSlavedStore
,
BaseSlavedStore
,
ClientIpStore
,
# After BaseSlavedStore because the constructor is different
ClientIpStore
,
# After BaseSlavedStore because the constructor is different
):
):
# XXX: This is a bit broken because we don't persist forgotten rooms
# in a way that they can be streamed. This means that we don't have a
# way to invalidate the forgotten rooms cache correctly.
# For now we expire the cache every 10 minutes.
BROKEN_CACHE_EXPIRY_MS
=
60
*
60
*
1000
who_forgot_in_room
=
(
who_forgot_in_room
=
(
RoomMemberStore
.
__dict__
[
"
who_forgot_in_room
"
]
RoomMemberStore
.
__dict__
[
"
who_forgot_in_room
"
]
)
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment