diff options
author | Erik Johnston <erik@matrix.org> | 2020-05-15 15:33:11 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2020-05-15 15:50:26 +0100 |
commit | 4f2a997e9f099c83cf4f866d6c6aabb1a5038e7d (patch) | |
tree | 02e5e563b3a96f62cfbe43b8ae9c87aa61d6600c | |
parent | Enable moving event persistence off of master (diff) | |
download | synapse-4f2a997e9f099c83cf4f866d6c6aabb1a5038e7d.tar.xz |
Add some debugging github/erikj/tests_move_events erikj/tests_move_events
-rw-r--r-- | synapse/config/logger.py | 1 | ||||
-rw-r--r-- | synapse/replication/http/_base.py | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/synapse/config/logger.py b/synapse/config/logger.py index a25c70e928..49f6c32beb 100644 --- a/synapse/config/logger.py +++ b/synapse/config/logger.py @@ -257,5 +257,6 @@ def setup_logging( logging.warning("***** STARTING SERVER *****") logging.warning("Server %s version %s", sys.argv[0], get_version_string(synapse)) logging.info("Server hostname: %s", config.server_name) + logging.info("Instance name: %s", hs.get_instance_name()) return logger diff --git a/synapse/replication/http/_base.py b/synapse/replication/http/_base.py index c3136a4eb9..793cef6c26 100644 --- a/synapse/replication/http/_base.py +++ b/synapse/replication/http/_base.py @@ -142,6 +142,7 @@ class ReplicationEndpoint(object): """ clock = hs.get_clock() client = hs.get_simple_http_client() + local_instance_name = hs.get_instance_name() master_host = hs.config.worker_replication_host master_port = hs.config.worker_replication_http_port @@ -151,6 +152,8 @@ class ReplicationEndpoint(object): @trace(opname="outgoing_replication_request") @defer.inlineCallbacks def send_request(instance_name="master", **kwargs): + if instance_name == local_instance_name: + raise Exception("Trying to send HTTP request to self") if instance_name == "master": host = master_host port = master_port |