Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
87215803
Commit
87215803
authored
6 years ago
by
Neil Johnson
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' of
https://github.com/matrix-org/synapse
into release-v0.28.0-rc1
parents
13a2beab
0ced8b5b
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/storage/room.py
+3
-3
3 additions, 3 deletions
synapse/storage/room.py
synapse/storage/search.py
+1
-1
1 addition, 1 deletion
synapse/storage/search.py
with
4 additions
and
4 deletions
synapse/storage/room.py
+
3
−
3
View file @
87215803
...
@@ -530,7 +530,7 @@ class RoomStore(RoomWorkerStore, SearchStore):
...
@@ -530,7 +530,7 @@ class RoomStore(RoomWorkerStore, SearchStore):
# Convert the IDs to MXC URIs
# Convert the IDs to MXC URIs
for
media_id
in
local_mxcs
:
for
media_id
in
local_mxcs
:
local_media_mxcs
.
append
(
"
mxc://%s/%s
"
%
(
self
.
hostname
,
media_id
))
local_media_mxcs
.
append
(
"
mxc://%s/%s
"
%
(
self
.
hs
.
hostname
,
media_id
))
for
hostname
,
media_id
in
remote_mxcs
:
for
hostname
,
media_id
in
remote_mxcs
:
remote_media_mxcs
.
append
(
"
mxc://%s/%s
"
%
(
hostname
,
media_id
))
remote_media_mxcs
.
append
(
"
mxc://%s/%s
"
%
(
hostname
,
media_id
))
...
@@ -595,7 +595,7 @@ class RoomStore(RoomWorkerStore, SearchStore):
...
@@ -595,7 +595,7 @@ class RoomStore(RoomWorkerStore, SearchStore):
while
next_token
:
while
next_token
:
sql
=
"""
sql
=
"""
SELECT stream_ordering, json FROM events
SELECT stream_ordering, json FROM events
JOIN event_json USING (event_id)
JOIN event_json USING (
room_id,
event_id)
WHERE room_id = ?
WHERE room_id = ?
AND stream_ordering < ?
AND stream_ordering < ?
AND contains_url = ? AND outlier = ?
AND contains_url = ? AND outlier = ?
...
@@ -619,7 +619,7 @@ class RoomStore(RoomWorkerStore, SearchStore):
...
@@ -619,7 +619,7 @@ class RoomStore(RoomWorkerStore, SearchStore):
if
matches
:
if
matches
:
hostname
=
matches
.
group
(
1
)
hostname
=
matches
.
group
(
1
)
media_id
=
matches
.
group
(
2
)
media_id
=
matches
.
group
(
2
)
if
hostname
==
self
.
hostname
:
if
hostname
==
self
.
hs
.
hostname
:
local_media_mxcs
.
append
(
media_id
)
local_media_mxcs
.
append
(
media_id
)
else
:
else
:
remote_media_mxcs
.
append
((
hostname
,
media_id
))
remote_media_mxcs
.
append
((
hostname
,
media_id
))
...
...
This diff is collapsed.
Click to expand it.
synapse/storage/search.py
+
1
−
1
View file @
87215803
...
@@ -77,7 +77,7 @@ class SearchStore(BackgroundUpdateStore):
...
@@ -77,7 +77,7 @@ class SearchStore(BackgroundUpdateStore):
sql
=
(
sql
=
(
"
SELECT stream_ordering, event_id, room_id, type, json,
"
"
SELECT stream_ordering, event_id, room_id, type, json,
"
"
origin_server_ts FROM events
"
"
origin_server_ts FROM events
"
"
JOIN event_json USING (event_id)
"
"
JOIN event_json USING (
room_id,
event_id)
"
"
WHERE ? <= stream_ordering AND stream_ordering < ?
"
"
WHERE ? <= stream_ordering AND stream_ordering < ?
"
"
AND (%s)
"
"
AND (%s)
"
"
ORDER BY stream_ordering DESC
"
"
ORDER BY stream_ordering DESC
"
...
...
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