db-conn-pool

command
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 9 Imported by: 0

README

db-conn-pool

database/sql discards a poisoned connection and retries on a fresh one.

newEngine installs a Times(1) ConnDrop rule on OpSQL. The adapter maps ConnDrop to driver.ErrBadConn, which makes database/sql discard that connection and retry on a new one — so a single Exec succeeds while the fake driver opens two connections.

Documentation

Overview

Command db-conn-pool shows database/sql discarding a poisoned connection and transparently retrying on a fresh one when chaos injects a connection drop. Run with `go run .`.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL