1
0
Fork 0

179 Commits (94e979cd3190069d33dbdc76e114705dc1bee36b)

Author SHA1 Message Date
Philip O Toole 2ebec9b973 Start adding support for snapshots
This shows that passing the database into the Raft module is probably
not going to work, since the database could be opened in two ways -
 directly at startup, and be completely restored from the log, or with
a combination of restoring from a snapshot, followed by the remaining
log entries. In both cases the database must be opened using the
requested DSN settings.

A detailed config object for controlling SQLite behaviour, is probably
best, and it should be passed to the Raft store on start up.

Finally, file-level copying of the SQLite file can only take place if
no transaction is in effect. This might be handled by the use of a
RWLock. The write-lock is taken during Execute() and Snapshot, but
the Read lock is taken during Query(). Unfortunately this may reduce
the concurrency of inserts and updates. Perhaps the Backup call on
the Go SQLite library might be better, but it might be slow.
9 years ago
Philip O'Toole 1bbff9d53a Lowest-layer database tests completed 9 years ago
Philip O'Toole e047d9e9d9 Test_SimpleFailingStatements ported 9 years ago
Philip O'Toole 3c88305a77 Unit test failing statement 9 years ago
Philip O'Toole 57b4dddd26 Add unit test of db package 9 years ago
Philip O'Toole 1855f2d541 Fix up use of interface{} and *interface{} 9 years ago
Philip O'Toole e8490b842e Query in db package almost there
It's the handling of the types, and ensuring they can be cast correctly,
which is what is next.
9 years ago
Philip O'Toole 63c74cabea Fully build with new db package 9 years ago
Philip O'Toole f6984f4134 Small wrapper around sqlite3 9 years ago
Philip O'Toole 08c310400a No need for db package 9 years ago
Philip O'Toole b95c84d16e Add database interface to Store
CREATE TABLE now works.
9 years ago
Philip O'Toole e17cceed91 Better name for test helper 9 years ago
Philip O'Toole 40b156fd47 Test_TransactionsHardFail now passes 9 years ago
Philip O'Toole 226938c0d1 Test_TransactionsConstraintViolation now passing 9 years ago
Philip O'Toole 801158fa83 Test_SimpleTransactions now passing 9 years ago
Philip O'Toole 62137fc798 Test_FailingSimpleStatements now passing 9 years ago
Philip O'Toole ac3b5f2050 Unit-test simple database insertion cases 9 years ago
Philip O'Toole 67e7fa3c8e Continue moving db tests to standard framework 9 years ago
Philip O'Toole 05fca403ab Start removal of nonstandard test framework 9 years ago
Philip O'Toole e43b0bc421 Initialize SQLite store 9 years ago
Philip O'Toole 12aef34625 Start integrating actual SQLite support
Builds without error.
9 years ago
Fernando Álvarez 022b536ade Revert "Revert "Merge pull request #25 from oscillatingworks/deprecate-log4go""
This reverts commit fe415e6452.
10 years ago
Philip O'Toole fe415e6452 Revert "Merge pull request #25 from oscillatingworks/deprecate-log4go"
This reverts commit f2de6cc26e, reversing
changes made to cdc6021ae7.

The change causes a panic when the server is started like so:

$GOPATH/bin/rqlite ~/node.1
10 years ago
Fernando Álvarez 48f9b8bfd4 gometalinter: rqlite/db
db/db.go:14:1⚠️ dbName is unused
db/db.go:30:11⚠️ error return value not checked (os.Remove(dbPath))
db/db.go:63:18⚠️ error return value not checked (defer rows.Close())
db/db.go:15:⚠️ unused global variable dbName
10 years ago
Fernando Álvarez eba40187a9 Deprecate code.google.com/p/log4go
- Add new internal `rqlite/log` package
- Replace `log4go` with `rqlite/log`
- Adapt log formatting in existing logs

Fixes #21
10 years ago
Philip O'Toole b91f275d1b Enhance logging 10 years ago
Philip O'Toole 4758106e53 Log a warning if a query might change the database 10 years ago
Philip O'Toole 1629c63987 Construct some log strings more idiomatically 10 years ago
Philip O'Toole e69218ef4a Layout source in a more conventional style 10 years ago