summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.rst23
-rw-r--r--MANIFEST.in1
-rw-r--r--synapse/__init__.py2
-rw-r--r--synapse/http/client.py18
-rw-r--r--synapse/http/server.py14
-rw-r--r--synapse/storage/__init__.py2
6 files changed, 53 insertions, 7 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index 1ca2407a73..778d3c00ec 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,3 +1,26 @@
+Changes in synapse v0.9.2 (2015-06-12)
+======================================
+
+General:
+
+* Use ultrajson for json deserialisation, and for serialisation when a
+  canonical encoding is not required. Ultrajson is significantly faster
+  than simplejson in some circumstances.
+* Use connection pools for outgoing HTTP connections.
+* Process thumbnails on separate threads.
+
+Configuration:
+
+* Add option to disable HTTP response compression.
+
+Federation:
+
+* Improve resilience of backfill by ensuring we fetch any missing auth events.
+* Improve performance of backfill and joining remote rooms by removing
+  unnecessary computations. This included handling events we'd previously
+  handled as well as attempting to compute the current state for outliers.
+
+
 Changes in synapse v0.9.1 (2015-05-26)
 ======================================
 
diff --git a/MANIFEST.in b/MANIFEST.in
index 8243a942ee..a9b543af82 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -5,6 +5,7 @@ include *.rst
 include demo/README
 
 recursive-include synapse/storage/schema *.sql
+recursive-include synapse/storage/schema *.py
 
 recursive-include demo *.dh
 recursive-include demo *.py
diff --git a/synapse/__init__.py b/synapse/__init__.py
index 4720d99848..e6088dc6cc 100644
--- a/synapse/__init__.py
+++ b/synapse/__init__.py
@@ -16,4 +16,4 @@
 """ This is a reference implementation of a Matrix home server.
 """
 
-__version__ = "0.9.1"
+__version__ = "0.9.2"
diff --git a/synapse/http/client.py b/synapse/http/client.py
index e746f2416e..9091ae2d38 100644
--- a/synapse/http/client.py
+++ b/synapse/http/client.py
@@ -61,21 +61,31 @@ class SimpleHttpClient(object):
         self.agent = Agent(reactor, pool=pool)
         self.version_string = hs.version_string
 
-    def request(self, method, *args, **kwargs):
+    def request(self, method, uri, *args, **kwargs):
         # A small wrapper around self.agent.request() so we can easily attach
         # counters to it
         outgoing_requests_counter.inc(method)
         d = preserve_context_over_fn(
             self.agent.request,
-            method, *args, **kwargs
+            method, uri, *args, **kwargs
         )
 
+        logger.info("Sending request %s %s", method, uri)
+
         def _cb(response):
             incoming_responses_counter.inc(method, response.code)
+            logger.info(
+                "Received response to  %s %s: %s",
+                method, uri, response.code
+            )
             return response
 
         def _eb(failure):
             incoming_responses_counter.inc(method, "ERR")
+            logger.info(
+                "Error sending request to  %s %s: %s %s",
+                method, uri, failure.type, failure.getErrorMessage()
+            )
             return failure
 
         d.addCallbacks(_cb, _eb)
@@ -84,7 +94,9 @@ class SimpleHttpClient(object):
 
     @defer.inlineCallbacks
     def post_urlencoded_get_json(self, uri, args={}):
+        # TODO: Do we ever want to log message contents?
         logger.debug("post_urlencoded_get_json args: %s", args)
+
         query_bytes = urllib.urlencode(args, True)
 
         response = yield self.request(
@@ -105,7 +117,7 @@ class SimpleHttpClient(object):
     def post_json_get_json(self, uri, post_json):
         json_str = encode_canonical_json(post_json)
 
-        logger.info("HTTP POST %s -> %s", json_str, uri)
+        logger.debug("HTTP POST %s -> %s", json_str, uri)
 
         response = yield self.request(
             "POST",
diff --git a/synapse/http/server.py b/synapse/http/server.py
index ae8f3b3972..e6e8a59f6c 100644
--- a/synapse/http/server.py
+++ b/synapse/http/server.py
@@ -32,6 +32,7 @@ from twisted.web.util import redirectTo
 
 import collections
 import logging
+import re
 import urllib
 
 logger = logging.getLogger(__name__)
@@ -82,9 +83,18 @@ def request_handler(request_handler):
             code = None
             start = self.clock.time_msec()
             try:
+                request_uri = request.uri
+
+                # Don't log access_tokens
+                request_uri = re.sub(
+                    r'(\?.*access_token=)[^&]*(.*)$',
+                    r'\1<redacted>\2',
+                    request_uri
+                )
+
                 logger.info(
-                    "Received request: %s %s",
-                    request.method, request.path
+                    "%s - Received request: %s %s",
+                    request.getClientIP(), request.method, request_uri
                 )
                 d = request_handler(self, request)
                 with PreserveLoggingContext():
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 71757c393a..c137f47820 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -51,7 +51,7 @@ logger = logging.getLogger(__name__)
 
 # Remember to update this number every time a change is made to database
 # schema files, so the users will be informed on server restarts.
-SCHEMA_VERSION = 19
+SCHEMA_VERSION = 20
 
 dir_path = os.path.abspath(os.path.dirname(__file__))