mirror of
https://github.com/sandronator/finetuning_aufgabe4.git
synced 2026-09-04 00:26:06 +02:00
[PR #2] [MERGED] Label output with Aufgabe + strategy + index config, fix lock hangs #1
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/sandronator/finetuning_aufgabe4/pull/2
Author: @sandronator
Created: 5/26/2026
Status: ✅ Merged
Merged: 5/26/2026
Merged by: @sandronator
Base:
main← Head:claude/quizzical-haibt-fd6d93📝 Commits (2)
da2453dLabel output with Aufgabe + strategy + index config, fix lock hangse7f2d0dMerge branch 'main' into claude/quizzical-haibt-fd6d93📊 Changes
6 files changed (+52 additions, -51 deletions)
View changed files
📝
baseStrategy.py(+22 -17)📝
hashJoinStrategy.py(+2 -2)📝
main.py(+13 -19)📝
manager.py(+11 -9)📝
nestedInnerLoopStrategy.py(+2 -2)📝
sortMergeStrategy.py(+2 -2)📄 Description
Two related improvements to make the test runs both usable and diagnosable:
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.
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:
main.py now tags each execute() call with its assignment number.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.