Compare commits

...

73 Commits

Author SHA1 Message Date
Erik Johnston
f0ed2e408f Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-05-19 14:50:55 +01:00
Erik Johnston
3da426357c Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-05-19 13:43:01 +01:00
Erik Johnston
5b83e958e8 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-05-18 17:48:53 +01:00
Erik Johnston
0e242aebc0 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-05-18 17:18:10 +01:00
Erik Johnston
e8ac65c4c9 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-05-18 16:51:40 +01:00
Erik Johnston
fbec8847be Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-05-18 16:04:59 +01:00
Erik Johnston
689b454674 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-05-18 10:03:21 +01:00
Erik Johnston
120eefdc19 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-05-15 11:36:34 +01:00
Erik Johnston
b517ae2d03 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-05-11 09:04:03 +01:00
Erik Johnston
ce32d1eed2 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-05-09 09:58:20 +01:00
Erik Johnston
0d8a2ee02b Revert "Remove unused import"
This reverts commit ab37bef83b.
2017-05-05 11:23:33 +01:00
Erik Johnston
25d3f28a98 Revert "We don't care about forgotten rooms"
This reverts commit ad8b316939.
2017-05-05 11:23:33 +01:00
Erik Johnston
17ddec014a Revert "Speed up filtering of a single event in push"
This reverts commit 421fdf7460.
2017-05-05 11:23:32 +01:00
Erik Johnston
fb4c0ada1f Disable presence
This reverts commit 0ebd376a53 and
disables presence a bit more
2017-05-05 11:03:37 +01:00
Erik Johnston
85999aade0 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-05-05 11:00:45 +01:00
Erik Johnston
dfc7bf2e84 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-05-03 10:54:24 +01:00
Erik Johnston
02928332d5 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-05-03 09:49:25 +01:00
hera
0ebd376a53 Reenable presence 2017-05-03 08:48:47 +00:00
Erik Johnston
05e62e0478 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-04-26 14:03:15 +01:00
Erik Johnston
97359ca4ec Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-04-25 11:18:47 +01:00
Erik Johnston
037aede1ee Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-04-24 14:36:14 +01:00
Erik Johnston
7ceacaaa6e Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-04-12 13:59:50 +01:00
Erik Johnston
0cbdfcbb75 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-04-11 09:44:37 +01:00
Erik Johnston
088d52ba6c Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-04-10 14:44:05 +01:00
Erik Johnston
d728648b65 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-04-05 14:24:41 +01:00
Erik Johnston
023600d20c Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-04-05 10:10:07 +01:00
Erik Johnston
076bc0510b Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-04-04 15:47:19 +01:00
Erik Johnston
2effa32140 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-04-04 11:20:46 +01:00
Erik Johnston
d7dbc56c71 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-03-31 10:11:07 +01:00
Erik Johnston
1ec9f7db27 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-03-27 18:39:25 +01:00
Erik Johnston
8224121502 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-03-24 13:59:35 +00:00
Erik Johnston
c042bcbe0f Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-03-21 13:11:19 +00:00
Erik Johnston
5bf6bcb850 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-03-21 13:09:38 +00:00
Erik Johnston
bbc0dbeec0 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-03-16 13:05:27 +00:00
Erik Johnston
b6b1382be1 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-03-15 16:08:46 +00:00
Erik Johnston
224dc4f6a9 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-03-15 11:30:41 +00:00
Erik Johnston
f90eb60ae9 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-03-15 10:00:10 +00:00
Erik Johnston
a0d6987991 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-03-13 10:06:28 +00:00
Erik Johnston
bf575ae20e Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-03-09 10:40:54 +00:00
Erik Johnston
929b005999 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-03-09 10:40:47 +00:00
Erik Johnston
01bcf01927 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-02-28 16:22:54 +00:00
Erik Johnston
ec9c8fc6cf Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-02-28 15:21:35 +00:00
Erik Johnston
f2c9e51d28 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-02-28 14:11:07 +00:00
Erik Johnston
8a6196c6c8 Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes 2017-02-27 16:40:11 +00:00
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
11 changed files with 17 additions and 9 deletions

View File

@@ -121,6 +121,7 @@ class SynchrotronPresence(object):
logger.info("Presence process_id is %r", self.process_id)
def send_user_sync(self, user_id, is_syncing, last_sync_ms):
return
self.hs.get_tcp_replication().send_user_sync(user_id, is_syncing, last_sync_ms)
def mark_as_coming_online(self, user_id):

View File

@@ -372,6 +372,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

@@ -372,6 +372,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()
@@ -401,6 +402,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
@@ -462,6 +464,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

@@ -43,7 +43,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

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

View File

@@ -81,7 +81,7 @@ class PresenceStatusRestServlet(ClientV1RestServlet):
except:
raise SynapseError(400, "Unable to parse state")
yield self.presence_handler.set_state(user, state)
# yield self.presence_handler.set_state(user, state)
defer.returnValue((200, {}))

View File

@@ -481,6 +481,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
@@ -650,9 +652,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

@@ -972,7 +972,6 @@ class EventsStore(SQLBaseStore):
"event_edge_hashes",
"event_edges",
"event_forward_extremities",
"event_push_actions",
"event_reference_hashes",
"event_search",
"event_signatures",

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: