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
Package registry
Container Registry
Model registry
Operate
Terraform modules
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
Timo Ley
synapse
Commits
52f99243
Commit
52f99243
authored
10 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Use is_outlier() so that we don't get AttributeError
parent
5b39cfff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
synapse/federation/replication.py
+3
-3
3 additions, 3 deletions
synapse/federation/replication.py
synapse/state.py
+1
-1
1 addition, 1 deletion
synapse/state.py
synapse/storage/__init__.py
+1
-3
1 addition, 3 deletions
synapse/storage/__init__.py
with
5 additions
and
7 deletions
synapse/federation/replication.py
+
3
−
3
View file @
52f99243
...
@@ -562,8 +562,8 @@ class ReplicationLayer(object):
...
@@ -562,8 +562,8 @@ class ReplicationLayer(object):
already_seen
=
(
already_seen
=
(
existing
and
(
existing
and
(
not
existing
.
internal_metadata
.
outlier
not
existing
.
internal_metadata
.
is_
outlier
()
or
pdu
.
internal_metadata
.
outlier
or
pdu
.
internal_metadata
.
is_
outlier
()
)
)
)
)
if
already_seen
:
if
already_seen
:
...
@@ -604,7 +604,7 @@ class ReplicationLayer(object):
...
@@ -604,7 +604,7 @@ class ReplicationLayer(object):
# )
# )
# Get missing pdus if necessary.
# Get missing pdus if necessary.
if
not
pdu
.
internal_metadata
.
outlier
:
if
not
pdu
.
internal_metadata
.
is_
outlier
()
:
# We only backfill backwards to the min depth.
# We only backfill backwards to the min depth.
min_depth
=
yield
self
.
handler
.
get_min_depth_for_context
(
min_depth
=
yield
self
.
handler
.
get_min_depth_for_context
(
pdu
.
room_id
pdu
.
room_id
...
...
This diff is collapsed.
Click to expand it.
synapse/state.py
+
1
−
1
View file @
52f99243
...
@@ -79,7 +79,7 @@ class StateHandler(object):
...
@@ -79,7 +79,7 @@ class StateHandler(object):
defer
.
returnValue
(
False
)
defer
.
returnValue
(
False
)
return
return
if
hasattr
(
event
,
"
outlier
"
)
and
event
.
outlier
:
if
event
.
is_
outlier
()
:
event
.
state_group
=
None
event
.
state_group
=
None
event
.
old_state_events
=
None
event
.
old_state_events
=
None
event
.
state_events
=
None
event
.
state_events
=
None
...
...
This diff is collapsed.
Click to expand it.
synapse/storage/__init__.py
+
1
−
3
View file @
52f99243
...
@@ -143,9 +143,7 @@ class DataStore(RoomMemberStore, RoomStore,
...
@@ -143,9 +143,7 @@ class DataStore(RoomMemberStore, RoomStore,
elif
event
.
type
==
EventTypes
.
Redaction
:
elif
event
.
type
==
EventTypes
.
Redaction
:
self
.
_store_redaction
(
txn
,
event
)
self
.
_store_redaction
(
txn
,
event
)
outlier
=
False
outlier
=
event
.
internal_metadata
.
is_outlier
()
if
hasattr
(
event
.
internal_metadata
,
"
outlier
"
):
outlier
=
event
.
internal_metadata
.
outlier
event_dict
=
{
event_dict
=
{
k
:
v
k
:
v
...
...
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