aboutsummaryrefslogtreecommitdiff
path: root/tests (unfollow)
Commit message (Collapse)AuthorFilesLines
2025-05-03re s/guuid/uuid/gEuAndreh5-364/+364
2025-02-05src/fiinha.go: os.Exit(rc) instead of ignoring rcEuAndreh1-1/+1
2025-01-27tests/fiinha.go: Remove unused execFn from argsTEuAndreh1-26/+13
2025-01-25tests/fiinha.go: Add test for `commands` varEuAndreh2-7/+18
2024-11-21tests/fiinha.go: Fix typoEuAndreh1-1/+1
2024-11-07src/fiinha.go: Reorder execSerialized() to after inTx()EuAndreh2-40/+40
2024-11-02Rename "q" -> "fiinha"EuAndreh42-449/+449
azĂȘ fiinha
2024-10-31src/q.go: Fix SQLite ~broken~ transactionsEuAndreh6-538/+703
As per expected by SQLite, create new connections so they have independent transaction, and serialize its use via a channel with a single consumer. == Other changes === Remove `db` attribute from `queueT` type Now that `initDB()` can create many database connections (A.K.A. opaque pointers to the `sqlite3*` object), it makes more sense to hand to it the responsability to create and destroy these databases. So now a `queries.close()` includes what previously was `db.Close()`, and needing to do it was the only reason that made us keep the `db` attribute. The arguments to `initDB()` were adjusted to reflect that, as it no longer is given an initialized database handle, but only the database path, and does the creation of the handles by itself. === Shoehorn multi-statement queries into single-statement ones In order to avoid creating one `execSerialized()` function per attribute of the `queryT` queries, we try to leverage SQLite's built-in transactionality per individual statement. So compound queries that were previously done in multiple statements wrapped with a `inTx()` that could be shoe-horned into a single `SELECT` were rewritten to avoid having more of this application-level serialization. The topic/consumer owner validation was also changed: now it is a trigger on the relevant tables that `ABORT` the implicit/invisible transaction and makes the `INSERT` fail. In order to make this possible, the `"%s_owners"` table now has an extra column: `instance_id`. Despite being extra data, this meta-information isn't duplicated from anywhere else, and it is an actual useful information for operators to leverage. So now the trigger is responsible for stopping the transaction from going forward without adding an explicit `inTx()` around it, and the writes can mostly be shrunk to single-statement queries. Fortunately, all this is enough to fix the `new-instance-takeover` functional test.
2024-10-29tests/q.go: Replace ":memory:" with golite.InMemoryEuAndreh1-24/+24
2024-10-29.gitignore: Include pattern for cgoEuAndreh1-0/+1
2024-10-29mkdeps.sh: Fix typo on varlist nameEuAndreh2-2/+2
2024-10-29Makefile: Prioritize local version when building and linkingEuAndreh1-2/+2
2024-10-27src/q.go: New() - manage *sql.DB handle internallyEuAndreh5-61/+39
2024-10-27Makefile: Simplify output generation of "bench" target dependenciesEuAndreh1-2/+1
2024-10-20Address renaming of acudego -> goliteEuAndreh6-111/+117
2024-10-20WIP: Address new-instance-takeover failureEuAndreh1-0/+2
2024-10-20Initial version: first implementationEuAndreh62-184/+9781
2024-09-12Init Go project skeleton with golite initEuAndreh10-0/+333