@@ -100,7 +100,6 @@ async def measure_connection_latency(
100100 database : str = "postgres" ,
101101 with_extension : bool = True ,
102102 root_path : Optional [str ] = None ,
103- stateless_enabled : bool = False ,
104103 run_first_query : bool = True ,
105104 create_table : bool = False ,
106105 table_name : str = "latency_test" ,
@@ -113,7 +112,6 @@ async def measure_connection_latency(
113112 database: Database to connect to
114113 with_extension: Whether to load pg_deeplake extension
115114 root_path: If set, configure deeplake.root_path
116- stateless_enabled: Whether to enable stateless mode
117115 run_first_query: Whether to measure first query time
118116 create_table: Whether to measure table creation time
119117 table_name: Name for test table
@@ -144,10 +142,6 @@ async def measure_connection_latency(
144142 await conn .execute ("CREATE EXTENSION pg_deeplake" )
145143 metrics .extension_load_time_ms = (time .perf_counter () - ext_start ) * 1000
146144
147- # Set stateless mode if requested
148- if stateless_enabled :
149- await conn .execute ("SET deeplake.stateless_enabled = true" )
150-
151145 # 3. Measure root_path set time (triggers catalog loading in stateless mode)
152146 if root_path :
153147 root_start = time .perf_counter ()
@@ -188,7 +182,6 @@ async def measure_catalog_discovery_latency(
188182 port : int ,
189183 root_path : str ,
190184 num_tables : int ,
191- stateless_enabled : bool = True ,
192185) -> LatencyMetrics :
193186 """
194187 Measure time to discover existing tables from catalog.
@@ -214,8 +207,6 @@ async def measure_catalog_discovery_latency(
214207 ext_start = time .perf_counter ()
215208 await conn .execute ("DROP EXTENSION IF EXISTS pg_deeplake CASCADE" )
216209 await conn .execute ("CREATE EXTENSION pg_deeplake" )
217- if stateless_enabled :
218- await conn .execute ("SET deeplake.stateless_enabled = true" )
219210 metrics .extension_load_time_ms = (time .perf_counter () - ext_start ) * 1000
220211
221212 # Set root_path - this triggers catalog discovery
@@ -349,7 +340,6 @@ async def test_stateless_catalog_loading_latency(pg_server, temp_root_path):
349340 try :
350341 await setup_conn .execute ("DROP EXTENSION IF EXISTS pg_deeplake CASCADE" )
351342 await setup_conn .execute ("CREATE EXTENSION pg_deeplake" )
352- await setup_conn .execute ("SET deeplake.stateless_enabled = true" )
353343 await setup_conn .execute (f"SET deeplake.root_path = '{ temp_root_path } '" )
354344
355345 # Create multiple tables to populate the catalog
@@ -383,7 +373,6 @@ async def test_stateless_catalog_loading_latency(pg_server, temp_root_path):
383373 port = 5432 ,
384374 root_path = temp_root_path ,
385375 num_tables = num_tables ,
386- stateless_enabled = True ,
387376 )
388377 report .add (metrics )
389378 print (f"Run { i + 1 } :" )
@@ -425,7 +414,6 @@ async def test_stateless_vs_nonstateless_comparison(pg_server, temp_root_path):
425414 metrics = await measure_connection_latency (
426415 with_extension = True ,
427416 root_path = temp_root_path ,
428- stateless_enabled = False ,
429417 run_first_query = True ,
430418 create_table = True ,
431419 table_name = f"nonstateless_test_{ i } " ,
@@ -441,7 +429,6 @@ async def test_stateless_vs_nonstateless_comparison(pg_server, temp_root_path):
441429 metrics = await measure_connection_latency (
442430 with_extension = True ,
443431 root_path = temp_root_path ,
444- stateless_enabled = True ,
445432 run_first_query = True ,
446433 create_table = True ,
447434 table_name = f"stateless_test_{ i } " ,
@@ -492,7 +479,6 @@ async def test_multi_table_catalog_scaling(pg_server, temp_root_path):
492479 try :
493480 await setup_conn .execute ("DROP EXTENSION IF EXISTS pg_deeplake CASCADE" )
494481 await setup_conn .execute ("CREATE EXTENSION pg_deeplake" )
495- await setup_conn .execute ("SET deeplake.stateless_enabled = true" )
496482 await setup_conn .execute (f"SET deeplake.root_path = '{ temp_root_path } '" )
497483
498484 # Create tables
@@ -512,7 +498,6 @@ async def test_multi_table_catalog_scaling(pg_server, temp_root_path):
512498 port = 5432 ,
513499 root_path = temp_root_path ,
514500 num_tables = num_tables ,
515- stateless_enabled = True ,
516501 )
517502 report .add (metrics )
518503
@@ -593,7 +578,6 @@ async def test_cold_start_simulation(pg_server, temp_root_path):
593578 try :
594579 await setup_conn .execute ("DROP EXTENSION IF EXISTS pg_deeplake CASCADE" )
595580 await setup_conn .execute ("CREATE EXTENSION pg_deeplake" )
596- await setup_conn .execute ("SET deeplake.stateless_enabled = true" )
597581 await setup_conn .execute (f"SET deeplake.root_path = '{ temp_root_path } '" )
598582
599583 await setup_conn .execute ("""
@@ -633,10 +617,6 @@ async def test_cold_start_simulation(pg_server, temp_root_path):
633617 try :
634618 # Extension is already loaded via shared_preload_libraries
635619 # Just configure the session (simulating a new backend)
636- ext_start = time .perf_counter ()
637- await conn .execute ("SET deeplake.stateless_enabled = true" )
638- ext_time = (time .perf_counter () - ext_start ) * 1000
639-
640620 root_start = time .perf_counter ()
641621 await conn .execute (f"SET deeplake.root_path = '{ temp_root_path } '" )
642622 root_time = (time .perf_counter () - root_start ) * 1000
@@ -650,7 +630,6 @@ async def test_cold_start_simulation(pg_server, temp_root_path):
650630
651631 print (f"\n Run { run + 1 } :" )
652632 print (f" Connection: { conn_time :8.2f} ms" )
653- print (f" Session config: { ext_time :8.2f} ms" )
654633 print (f" Root path set: { root_time :8.2f} ms" )
655634 print (f" First query: { query_time :8.2f} ms (count={ count } )" )
656635 print (f" TOTAL COLD START: { total_time :8.2f} ms" )
0 commit comments