Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

chore(sql): enable txlock immediate by default (#12048)

Vikrant Guptaa91cee2b95d3
diff --git a/conf/example.yaml b/conf/example.yaml
index 512d76e2e5..06e5f28e9b 100644
--- a/conf/example.yaml
+++ b/conf/example.yaml
@@ -129,7 +129,7 @@ sqlstore:
# The timeout for the sqlite database to wait for a lock.
busy_timeout: 10s
# The default transaction locking behavior. Supported values: deferred, immediate, exclusive.
- transaction_mode: deferred
+ transaction_mode: immediate
##################### APIServer #####################
apiserver:
diff --git a/pkg/sqlstore/config.go b/pkg/sqlstore/config.go
index f6d97dba17..3e98510100 100644
--- a/pkg/sqlstore/config.go
+++ b/pkg/sqlstore/config.go
@@ -60,7 +60,7 @@ func newConfig() factory.Config {
Path: "/var/lib/signoz/signoz.db",
Mode: "wal",
BusyTimeout: 10000 * time.Millisecond, // increasing the defaults from https://github.com/mattn/go-sqlite3/blob/master/sqlite3.go#L1098 because of transpilation from C to GO
- TransactionMode: "deferred",
+ TransactionMode: "immediate",
},
}
diff --git a/tests/conftest.py b/tests/conftest.py
index 614ebbba7e..67d1a8afd5 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -62,12 +62,6 @@ def pytest_addoption(parser: pytest.Parser):
default="delete",
help="sqlite mode",
)
- parser.addoption(
- "--sqlite-transaction-mode",
- action="store",
- default="deferred",
- help="sqlite transaction mode",
- )
parser.addoption(
"--postgres-version",
action="store",
diff --git a/tests/fixtures/sqlite.py b/tests/fixtures/sqlite.py
index da25814236..23ac6cedc9 100644
--- a/tests/fixtures/sqlite.py
+++ b/tests/fixtures/sqlite.py
@@ -30,7 +30,6 @@ def sqlite(
assert result.fetchone()[0] == 1
mode = pytestconfig.getoption("--sqlite-mode")
- transaction_mode = pytestconfig.getoption("--sqlite-transaction-mode")
return types.TestContainerSQL(
container=types.TestContainerDocker(
id="",
@@ -42,7 +41,6 @@ def sqlite(
"SIGNOZ_SQLSTORE_PROVIDER": "sqlite",
"SIGNOZ_SQLSTORE_SQLITE_PATH": str(path),
"SIGNOZ_SQLSTORE_SQLITE_MODE": mode,
- "SIGNOZ_SQLSTORE_SQLITE_TRANSACTION__MODE": transaction_mode,
},
)