From b4b57c14cb6c0e31d3387ad4b0ea69f751d5817e Mon Sep 17 00:00:00 2001 From: Haelnorr Date: Mon, 17 Feb 2025 23:32:48 +1100 Subject: [PATCH] Removed debugging stdout prints --- db/connection.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/db/connection.go b/db/connection.go index 432fe1e..199417f 100644 --- a/db/connection.go +++ b/db/connection.go @@ -32,13 +32,11 @@ func (conn *SafeConn) acquireGlobalLock() bool { return false } atomic.StoreInt32(&conn.globalLockStatus, 1) - fmt.Println("=====================GLOBAL LOCK ACQUIRED==================") return true } func (conn *SafeConn) releaseGlobalLock() { atomic.StoreInt32(&conn.globalLockStatus, 0) - fmt.Println("=====================GLOBAL LOCK RELEASED==================") } func (conn *SafeConn) acquireReadLock() bool { @@ -46,13 +44,11 @@ func (conn *SafeConn) acquireReadLock() bool { return false } atomic.AddInt32(&conn.readLockCount, 1) - fmt.Println("=====================READ LOCK ACQUIRED==================") return true } func (conn *SafeConn) releaseReadLock() { atomic.AddInt32(&conn.readLockCount, -1) - fmt.Println("=====================READ LOCK RELEASED==================") } // Starts a new transaction based on the current context. Will cancel if @@ -65,7 +61,6 @@ func (conn *SafeConn) Begin(ctx context.Context) (*SafeTX, error) { go func() { select { case <-lockCtx.Done(): - fmt.Println("=====================READ LOCK ABANDONED==================") return default: if conn.acquireReadLock() { @@ -151,10 +146,8 @@ func (conn *SafeConn) Resume() { // Close the database connection func (conn *SafeConn) Close() error { - fmt.Println("=====================DB LOCKING FOR SHUTDOWN==================") conn.acquireGlobalLock() defer conn.releaseGlobalLock() - fmt.Println("=====================DB LOCKED FOR SHUTDOWN==================") return conn.db.Close() }