Compare commits

...

29 Commits

Author SHA1 Message Date
Matrix
8d910ff5b9 Local changes 2017-02-24 16:01:57 +00:00
Erik Johnston
cff886c47b Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-02-21 14:01:45 +00:00
Erik Johnston
a24492c06f Don't limit count 2017-02-21 14:01:33 +00:00
Erik Johnston
ede125b7e1 Fix up notif rotation 2017-02-18 14:41:31 +00:00
Erik Johnston
c97d491649 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-02-16 15:12:52 +00:00
Erik Johnston
3b42bb96e4 Merge commit 'd7457c7661fa3b28427b21f44252c3abbee45ef8' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-02-15 10:17:01 +00:00
Erik Johnston
738000971e Merge branch 'develop' into matrix-org-hotfixes 2017-02-15 09:54:09 +00:00
Erik Johnston
96ef35c62f Merge branch 'master' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-02-09 13:50:38 +00:00
Erik Johnston
83c7b8ec91 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-02-02 19:26:05 +00:00
Erik Johnston
f57cb21952 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-02-02 09:30:20 +00:00
Erik Johnston
4abecb7b02 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-02-01 14:33:28 +00:00
Erik Johnston
010159365c Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-01-31 11:20:51 +00:00
Erik Johnston
717e4448c4 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-01-30 14:36:46 +00:00
Erik Johnston
e41f183aa8 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-01-20 14:00:31 +00:00
Erik Johnston
10f7bfe897 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-01-11 10:57:42 +00:00
Erik Johnston
772b8ebe54 PEP8 2017-01-10 16:38:00 +00:00
Erik Johnston
3c9acdef4d Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-01-10 16:31:06 +00:00
Erik Johnston
fe28150cdc Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-01-10 16:16:17 +00:00
Mark Haines
69ef497253 Log which files we saved attachments to in the media_repository 2017-01-10 14:29:17 +00:00
Matrix
1d08de6ce9 Merge branch 'release-v0.18.7' into matrix-org-hotfixes 2017-01-07 04:03:15 +00:00
Matrix
10d31c433b Merge branch 'release-v0.18.7' into matrix-org-hotfixes 2017-01-07 03:12:35 +00:00
Mark Haines
345afd9fdc Merge tag 'v0.18.6-rc3' into matrix-org-hotfixes
v0.18.6-rc3
2017-01-05 14:19:36 +00:00
Matrix
7ed07066ac Merge branch 'markjh/linearizer_logging' into matrix-org-hotfixes 2017-01-01 13:55:13 +00:00
Mark Haines
2f703b8645 Merge branch 'markjh/fix_get_missing' into matrix-org-hotfixes 2016-12-30 18:47:10 +00:00
Mark Haines
9fff1aacca Merge remote-tracking branch 'origin/release-v0.18.6' into matrix-org-hotfixes 2016-12-30 14:04:16 +00:00
Mark Haines
cb842dc99f Deleting from event_push_actions needs to use an index 2016-12-29 16:54:03 +00:00
Mark Haines
2238a10b42 Merge branch 'release-v0.18.6' into matrix-org-hotfixes 2016-12-29 16:26:52 +00:00
Matthew Hodgson
2998fa57b0 merge uncommitted changes from matrix.org into hotfixes-v0.18.5 2016-12-20 12:14:08 +00:00
Richard van der Hoff
f5abaafabd uncommitted changes on matrix.org
These might be important? who knows?
2016-12-20 11:49:25 +00:00
10 changed files with 25 additions and 10 deletions

View File

@@ -327,7 +327,7 @@ class DeviceHandler(BaseHandler):
user_id
)
logger.info("Extrem: %r, prev_ids: %r", extremity, prev_ids)
if str(extremity) == str(prev_ids[0]):
if extremity and prev_ids[0] and int(extremity) >= int(prev_ids[0]):
resync = False
if resync:

View File

@@ -363,6 +363,7 @@ class InitialSyncHandler(BaseHandler):
@defer.inlineCallbacks
def get_presence():
defer.returnValue([])
states = yield presence_handler.get_states(
[m.user_id for m in room_members],
as_event=True,

View File

@@ -373,6 +373,7 @@ class PresenceHandler(object):
"""We've seen the user do something that indicates they're interacting
with the app.
"""
return
user_id = user.to_string()
bump_active_time_counter.inc()
@@ -402,6 +403,7 @@ class PresenceHandler(object):
Useful for streams that are not associated with an actual
client that is being used by a user.
"""
affect_presence = False
if affect_presence:
curr_sync = self.user_to_num_current_syncs.get(user_id, 0)
self.user_to_num_current_syncs[user_id] = curr_sync + 1
@@ -463,6 +465,7 @@ class PresenceHandler(object):
syncing_user_ids(set(str)): The set of user_ids that are
currently syncing on that server.
"""
return
# Grab the previous list of user_ids that were syncing on that process
prev_syncing_user_ids = (

View File

@@ -42,7 +42,7 @@ EMTPY_THIRD_PARTY_ID = ThirdPartyInstanceID(None, None)
class RoomListHandler(BaseHandler):
def __init__(self, hs):
super(RoomListHandler, self).__init__(hs)
self.response_cache = ResponseCache(hs)
self.response_cache = ResponseCache(hs, timeout_ms=10 * 60 * 1000)
self.remote_response_cache = ResponseCache(hs, timeout_ms=30 * 1000)
def get_local_public_room_list(self, limit=None, since_token=None,

View File

@@ -539,7 +539,7 @@ class SyncHandler(object):
since_token is None and
sync_config.filter_collection.blocks_all_presence()
)
if not block_all_presence_data:
if False or not block_all_presence_data:
yield self._generate_sync_entry_for_presence(
sync_result_builder, newly_joined_rooms, newly_joined_users
)

View File

@@ -218,7 +218,8 @@ class EmailPusher(object):
)
def seconds_until(self, ts_msec):
return (ts_msec - self.clock.time_msec()) / 1000
secs = (ts_msec - self.clock.time_msec()) / 1000
return max(secs, 0) # Ensure non-negative
def get_room_throttle_ms(self, room_id):
if room_id in self.throttle_params:

View File

@@ -474,6 +474,7 @@ class RoomInitialSyncRestServlet(ClientV1RestServlet):
@defer.inlineCallbacks
def on_GET(self, request, room_id):
# raise RuntimeError("Guest access has been disabled")
requester = yield self.auth.get_user_by_req(request, allow_guest=True)
pagination_config = PaginationConfig.from_request(request)
content = yield self.initial_sync_handler.room_initial_sync(

View File

@@ -87,6 +87,8 @@ class EventPushActionsStore(SQLBaseStore):
self._rotate_notif_loop = self._clock.looping_call(
self._rotate_notifs, 30 * 60 * 1000
)
self._rotate_delay = 3
self._rotate_count = 10000
def _set_push_actions_for_event_and_users_txn(self, txn, event, tuples):
"""
@@ -629,7 +631,7 @@ class EventPushActionsStore(SQLBaseStore):
)
if caught_up:
break
yield sleep(5)
yield sleep(self._rotate_delay)
finally:
self._doing_notif_rotation = False
@@ -639,7 +641,7 @@ class EventPushActionsStore(SQLBaseStore):
"""
# We want to make sure that we only ever do this one at a time
self.database_engine.lock_table(txn, "event_push_summary")
# self.database_engine.lock_table(txn, "event_push_summary")
old_rotate_stream_ordering = self._simple_select_one_onecol_txn(
txn,
@@ -653,9 +655,10 @@ class EventPushActionsStore(SQLBaseStore):
txn.execute("""
SELECT stream_ordering FROM event_push_actions
WHERE stream_ordering > ?
ORDER BY stream_ordering ASC LIMIT 1 OFFSET 50000
""", (old_rotate_stream_ordering,))
ORDER BY stream_ordering ASC LIMIT 1 OFFSET ?
""", (old_rotate_stream_ordering, self._rotate_count))
stream_row = txn.fetchone()
# stream_row = (old_rotate_stream_ordering + self._rotate_count,)
if stream_row:
offset_stream_ordering, = stream_row
rotate_to_stream_ordering = min(

View File

@@ -765,7 +765,6 @@ class EventsStore(SQLBaseStore):
"event_edge_hashes",
"event_edges",
"event_forward_extremities",
"event_push_actions",
"event_reference_hashes",
"event_search",
"event_signatures",
@@ -784,6 +783,13 @@ class EventsStore(SQLBaseStore):
"DELETE FROM %s WHERE event_id = ?" % (table,),
[(ev.event_id,) for ev, _ in events_and_contexts]
)
for table in (
"event_push_actions",
):
txn.executemany(
"DELETE FROM %s WHERE room_id = ? AND event_id = ?" % (table,),
[(ev.event_id,) for ev, _ in events_and_contexts]
)
self._simple_insert_many_txn(
txn,

View File

@@ -600,7 +600,7 @@ def _parse_query(database_engine, search_term):
results = re.findall(r"([\w\-]+)", search_term, re.UNICODE)
if isinstance(database_engine, PostgresEngine):
return " & ".join(result + ":*" for result in results)
return " & ".join(result for result in results)
elif isinstance(database_engine, Sqlite3Engine):
return " & ".join(result + "*" for result in results)
else: