You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct. ↩
13 test cases ran. 3 additional findings, 10 passed.
Across 13 total tests, 10 passed and 3 failed, with strong coverage confirming stable planner/prepared-statement behavior, correct provider-wrapping semantics, successful first-run default database creation, and core replication paths (WAL apply, full-config startup, and reconnect exactly-once behavior). The most important findings were three high-impact, code-backed defects: bootstrap credential overrides via DOLTGRES_USER/DOLTGRES_PASSWORD can be ignored because auth is initialized before rebinding to the configured data directory, replication Stop() has a shutdown race that can still apply and persist WAL after shutdown is requested, and mid-transaction replay failures can leave partial replica transaction state because rollback/session cleanup is not guaranteed before retry.
✅ Passed (10)
Category
Summary
Screenshot
Bootstrap
Started on an empty data directory and verified the default postgres database was created on first startup.
Bootstrap
Verified retry behavior after replication init failure and confirmed default DB invariants were preserved on restart.
Planner
Analyzer failure path stayed stable and subsequent parameterized execution succeeded (prep-ok) without session desync.
Planner
Bind-type inference without explicit parameter OIDs succeeded and returned prep-ok with no bind-type error.
Planner
Explicit parameter OID prepared-statement flow completed successfully and returned expected value 42.
Provider
Invalid provider input failed fast and no SQL listener started.
Provider
Wrapped provider catalog and relation-resolution semantics behaved as expected.
Replication
Transactional INSERT/UPDATE/DELETE replay converged to expected committed replica state.
Replication
Replication worker started with complete config and replicated probe writes successfully.
Replication
Reconnect after upstream restart preserved exactly-once effects for validated commits.
ℹ️ Additional Findings (3)
These findings are unrelated to the current changes but were observed during testing.
Category
Summary
Screenshot
Bootstrap
⚠️DOLTGRES_USER/DOLTGRES_PASSWORD overrides did not replace default credentials on clean startup.
Replication
⚠️ Stop handling can still apply WAL work after shutdown is requested.
Replication
⚠️ Mid-transaction replay errors can leave inconsistent recovery semantics.
⚠️ Environment override credentials ignored on bootstrap
What failed: The old postgres/password credentials remained valid while adminuser/strongpass was rejected, but expected behavior is that only the override credentials authenticate.
Impact: Initial credential bootstrap can bind to the wrong auth store, causing configured admin credentials to fail while stale/default credentials continue working. This breaks a core authentication workflow on first-run server provisioning.
Steps to reproduce:
Set DOLTGRES_USER=adminuser and DOLTGRES_PASSWORD=strongpass.
Start doltgres with a fresh data directory.
Attempt login with both postgres/password and adminuser/strongpass.
Stub / mock context: The run initially used deterministic local auth/startup bypass edits during early bootstrap checks, then this case was revalidated from a clean source state with an isolated data directory and explicit credential override inputs.
Code analysis: I traced startup/auth initialization through server/server.go, server/initialization/initialization.go, and server/auth/database.go. Authentication is initialized before dEnv is rebound to the configured data_dir, and auth persistence reads/writes using that early environment path, which plausibly causes credential state to come from the wrong location.
Why this is likely a bug: The code initializes auth state from a pre-rebind environment and only later switches to the configured data_dir, so first-run credential bootstrap can legitimately persist/read from the wrong auth location.
// Reload the dolt environment with the correct data dir that was specified in the configuration.// This initial dEnv instance is loaded for the current working directory.dataDirFs, err:=dEnv.FS.WithWorkingDir(ssCfg.DataDir())
iferr!=nil {
returnnil, err
}
dEnv=env.Load(ctx, dEnv.GetUserHomeDir, dataDirFs, doltdb.LocalDirDoltDB, dEnv.Version)
⚠️ Replication stop can still apply WAL after shutdown signal
What failed: Shutdown is not externally atomic: if message receipt wins the select, message processing and WAL apply/write can proceed even after a stop request, violating expected stop boundary behavior.
Impact: Replication can apply changes after operators believe shutdown has begun, which risks duplicate-or-skip behavior across restart boundaries. This affects correctness of a core replication workflow and has no reliable operator-side workaround.
Steps to reproduce:
Start logical replication with active WAL traffic.
Trigger Stop() while copy data messages are arriving.
Observe whether apply and WAL write paths still run after shutdown was requested.
Stub / mock context: Authentication and authorization checks were bypassed to keep startup deterministic, and a default public role was ensured during local initialization. This bug finding came from direct source-path analysis of replication shutdown logic, not from mocked WAL payloads.
Code analysis: I reviewed the replication loop and stop handshake in server/logrepl/replication.go and found a race where Stop() sends on r.stop, but StartReplication may take the message branch first and continue into processMessage and WAL position persistence before honoring shutdown.
Why this is likely a bug: The stop channel handshake does not prevent in-flight message processing from completing and persisting state after stop is requested, so shutdown does not enforce an atomic externally visible cutoff.
log.Print("stopping replication...")
r.stop<-struct{}{}
// wait for the channel to be closed, acknowledging that the replicator has stopped<-r.stop
⚠️ Replay errors can leave partial replica transaction state
What failed: On mid-transaction replay errors, code returns without issuing rollback/state cleanup, while retry logic resets only the primary stream connection; this leaves recovery semantics unable to guarantee atomic replay outcomes.
Impact: A failed replay can leave partial transaction effects or uncertain transaction state on the replica, undermining transactional consistency guarantees. This directly impacts reliability of replicated data for core workloads.
Steps to reproduce:
Run replication on multi-statement transactional WAL.
Force a replay failure in the middle of transaction apply.
Allow retry/reconnect and compare final replica state against all-or-nothing transaction expectations.
Stub / mock context: Authentication and authorization checks were bypassed to keep startup deterministic, and a default public role was ensured during local initialization. The bug confirmation relied on source-level replay error handling paths rather than synthetic replication response mocks.
Code analysis: I inspected processMessage and connection retry logic in server/logrepl/replication.go; DML replay failures return immediately with no rollback call, and retry handling closes/recreates only primaryConn, not the replica transaction session.
Why this is likely a bug: Error paths lack compensating rollback or replica session reset before retry, so the implementation cannot preserve transaction-level all-or-nothing guarantees after mid-apply failures.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
☕ An Automated Dependency Version Bump PR 👑
Initial Changes
The changes contained in this PR were produced by `go get`ing the dependency.
```bash
go get github.com/dolthub/[dependency]/go@[commit]
```