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
27c005ae
Commit
27c005ae
authored
8 years ago
by
Erik Johnston
Browse files
Options
Downloads
Plain Diff
Merge branch 'release-v0.19.1' of github.com:matrix-org/synapse
parents
fad3a843
505bfd82
Branches
Branches containing commit
Tags
v0.19.1
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGES.rst
+7
-0
7 additions, 0 deletions
CHANGES.rst
synapse/__init__.py
+1
-1
1 addition, 1 deletion
synapse/__init__.py
synapse/storage/events.py
+6
-9
6 additions, 9 deletions
synapse/storage/events.py
with
14 additions
and
10 deletions
CHANGES.rst
+
7
−
0
View file @
27c005ae
Changes in synapse v0.19.1 (2017-02-09)
=======================================
* Fix bug where state was incorrectly reset in a room when synapse received an
event over federation that did not pass auth checks (PR #1892)
Changes in synapse v0.19.0 (2017-02-04)
Changes in synapse v0.19.0 (2017-02-04)
=======================================
=======================================
...
...
This diff is collapsed.
Click to expand it.
synapse/__init__.py
+
1
−
1
View file @
27c005ae
...
@@ -16,4 +16,4 @@
...
@@ -16,4 +16,4 @@
"""
This is a reference implementation of a Matrix home server.
"""
This is a reference implementation of a Matrix home server.
"""
"""
__version__
=
"
0.19.
0
"
__version__
=
"
0.19.
1
"
This diff is collapsed.
Click to expand it.
synapse/storage/events.py
+
6
−
9
View file @
27c005ae
...
@@ -302,7 +302,7 @@ class EventsStore(SQLBaseStore):
...
@@ -302,7 +302,7 @@ class EventsStore(SQLBaseStore):
room_id
room_id
)
)
new_latest_event_ids
=
yield
self
.
_calculate_new_extremeties
(
new_latest_event_ids
=
yield
self
.
_calculate_new_extremeties
(
room_id
,
[
ev
for
ev
,
_
in
ev_ctx_rm
]
room_id
,
ev
_ctx_rm
,
latest_event_ids
)
)
if
new_latest_event_ids
==
set
(
latest_event_ids
):
if
new_latest_event_ids
==
set
(
latest_event_ids
):
...
@@ -329,27 +329,24 @@ class EventsStore(SQLBaseStore):
...
@@ -329,27 +329,24 @@ class EventsStore(SQLBaseStore):
persist_event_counter
.
inc_by
(
len
(
chunk
))
persist_event_counter
.
inc_by
(
len
(
chunk
))
@defer.inlineCallbacks
@defer.inlineCallbacks
def
_calculate_new_extremeties
(
self
,
room_id
,
events
):
def
_calculate_new_extremeties
(
self
,
room_id
,
event
_contexts
,
latest_event_id
s
):
"""
Calculates the new forward extremeties for a room given events to
"""
Calculates the new forward extremeties for a room given events to
persist.
persist.
Assumes that we are only persisting events for one room at a time.
Assumes that we are only persisting events for one room at a time.
"""
"""
latest_event_ids
=
yield
self
.
get_latest_event_ids_in_room
(
room_id
)
new_latest_event_ids
=
set
(
latest_event_ids
)
new_latest_event_ids
=
set
(
latest_event_ids
)
# First, add all the new events to the list
# First, add all the new events to the list
new_latest_event_ids
.
update
(
new_latest_event_ids
.
update
(
event
.
event_id
for
event
in
events
event
.
event_id
for
event
,
ctx
in
event
_context
s
if
not
event
.
internal_metadata
.
is_outlier
()
if
not
event
.
internal_metadata
.
is_outlier
()
and
not
ctx
.
rejected
)
)
# Now remove all events that are referenced by the to-be-added events
# Now remove all events that are referenced by the to-be-added events
new_latest_event_ids
.
difference_update
(
new_latest_event_ids
.
difference_update
(
e_id
e_id
for
event
in
events
for
event
,
ctx
in
event
_context
s
for
e_id
,
_
in
event
.
prev_events
for
e_id
,
_
in
event
.
prev_events
if
not
event
.
internal_metadata
.
is_outlier
()
if
not
event
.
internal_metadata
.
is_outlier
()
and
not
ctx
.
rejected
)
)
# And finally remove any events that are referenced by previously added
# And finally remove any events that are referenced by previously added
...
...
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