Commit Graph
11 Commits
Author SHA1 Message Date
Sandro Fuetsch d59c198a81 Merge branch 'main' into lol 2026-05-26 21:10:40 +02:00
Sandro Fuetsch Titan a6082fafd3 lol 2026-05-26 21:08:48 +02:00
Sandro Fuetsch 3cb8aec420 Merge pull request #2 from sandronator/claude/quizzical-haibt-fd6d93
Label output with Aufgabe + strategy + index config, fix lock hangs
2026-05-26 21:07:55 +02:00
Sandro Fuetsch e7f2d0d66c Merge branch 'main' into claude/quizzical-haibt-fd6d93 2026-05-26 21:07:46 +02:00
Sandro Fuetsch TitanandClaude Opus 4.7 da2453da32 Label output with Aufgabe + strategy + index config, fix lock hangs
Two related improvements to make the test runs both usable and
diagnosable:

1. Avoid lock waits / "deadlock" hangs during CLUSTER
   The Manager connection ran EXPLAIN ANALYZE without committing, so
   psycopg2's default autocommit=False left an open transaction
   holding AccessShareLock on publ and auth. The next setup_db then
   blocked on DROP INDEX / CLUSTER (both need AccessExclusiveLock),
   visible as a hang -- typically at the CLUSTER step. Setting
   conn_postsql.autocommit = True releases the locks immediately after
   each SELECT, which is safe here because all Manager queries are
   read-only.

2. Make the run output identify which test is running
   The "Running: ..." line previously printed only the query key
   (query_1/query_2), shadowing 'strategy' with the dict key and never
   surfacing which join strategy or index config was active. Output
   now reads e.g. "[Aufgabe 3b | SortMergeStrategy | idx=nc-both]" by:
   - using self.__class__.__name__ so subclasses surface correctly
   - passing the current index_config from Manager into the strategy
   - threading an optional 'aufgabe' label through Manager.execute()
     and into each strategy's run() (including the Nested/SortMerge/
     Hash wrappers that override run()).

main.py now tags each execute() call with its assignment number.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-05-26 21:04:15 +02:00
Sandro Fuetsch Titan 3c3e10fd78 minor changes 2026-05-26 20:13:40 +02:00
Sandro Fuetsch edfd198bcd Merge pull request #1 from sandronator/claude/quizzical-haibt-fd6d93
Load DBLP data once instead of reloading per index config
2026-05-26 19:50:44 +02:00
Sandro Fuetsch TitanandClaude Opus 4.7 d8a906e2d4 Load DBLP data once instead of reloading per index config
The Manager previously called setupBoth() on every test step, which
dropped both PostgreSQL and MariaDB tables and re-imported the full
DBLP TSVs (~9 reloads across 2 DBs in a single run, even though only
PostgreSQL was used). Now data is loaded once via load_data_postgres()
and only the indexes are swapped between tests via apply_indexes_postgres().

A reset_postgres(config, reload_data=False) helper lets callers force
a full reload when needed -- used after 'cl-both' tests, since CLUSTER
physically reorders the table and dropping the index alone does not
restore the original layout.

Also fixes two bugs found while reading the code:
- baseStrategy.run iterated 'self.queries' instead of '.items()',
  which would crash on the first unpack.
- main.py was missing an execute() call after the Aufgabe 3 'cl-both'
  setup, silently skipping that test.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-05-26 19:50:07 +02:00
Sandro Fuetsch Titan 8a8926cef8 mhmmm 2026-05-26 19:35:50 +02:00
Sandro Fuetsch Titan 71b6b818a4 first commit 2026-05-26 19:31:23 +02:00
Sandro Fuetsch Titan 7a46ef3759 first commit 2026-05-26 19:23:46 +02:00