mirror of https://github.com/citusdata/citus.git
Add code to show debug messages
parent
ab543c00d0
commit
e55e474d00
|
@ -402,6 +402,10 @@ PORT_UPPER_BOUND = 32768
|
||||||
next_port = PORT_LOWER_BOUND
|
next_port = PORT_LOWER_BOUND
|
||||||
|
|
||||||
|
|
||||||
|
def notice_handler(diag: psycopg.errors.Diagnostic):
|
||||||
|
print(f"{diag.severity} ({diag.sqlstate}): {diag.message_primary}")
|
||||||
|
|
||||||
|
|
||||||
def cleanup_test_leftovers(nodes):
|
def cleanup_test_leftovers(nodes):
|
||||||
"""
|
"""
|
||||||
Cleaning up test leftovers needs to be done in a specific order, because
|
Cleaning up test leftovers needs to be done in a specific order, because
|
||||||
|
@ -499,10 +503,12 @@ class QueryRunner(ABC):
|
||||||
def conn(self, *, autocommit=True, **kwargs):
|
def conn(self, *, autocommit=True, **kwargs):
|
||||||
"""Open a psycopg connection to this server"""
|
"""Open a psycopg connection to this server"""
|
||||||
self.set_default_connection_options(kwargs)
|
self.set_default_connection_options(kwargs)
|
||||||
return psycopg.connect(
|
conn = psycopg.connect(
|
||||||
autocommit=autocommit,
|
autocommit=autocommit,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
)
|
)
|
||||||
|
conn.add_notice_handler(notice_handler)
|
||||||
|
return conn
|
||||||
|
|
||||||
def aconn(self, *, autocommit=True, **kwargs):
|
def aconn(self, *, autocommit=True, **kwargs):
|
||||||
"""Open an asynchronous psycopg connection to this server"""
|
"""Open an asynchronous psycopg connection to this server"""
|
||||||
|
|
|
@ -14,7 +14,7 @@ def test_isolate(cluster):
|
||||||
|
|
||||||
row_count1 = cluster.coordinator.sql_value("SELECT count(*) FROM pg_dist_shard")
|
row_count1 = cluster.coordinator.sql_value("SELECT count(*) FROM pg_dist_shard")
|
||||||
|
|
||||||
query = "SELECT citus_auto_shard_split_start('block_writes')"
|
query = "SET client_min_messages = DEBUG4; SELECT citus_auto_shard_split_start('block_writes')"
|
||||||
jobId = cluster.coordinator.sql_value(query)
|
jobId = cluster.coordinator.sql_value(query)
|
||||||
print(cluster.coordinator.sql_value("select command from pg_dist_background_task where status = 'runnable'"))
|
print(cluster.coordinator.sql_value("select command from pg_dist_background_task where status = 'runnable'"))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue