Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/stretchr/testify/commit/083ff1c0449867d0d8d456483ee5fab8e0c0e1e6"><code>083ff1c</code></a> Fixed didPanic to now detect panic(nil).</li> <li><a href="https://github.com/stretchr/testify/commit/1e36bfe10404cb77c12f6dfc8665564f3a41ad7e"><code>1e36bfe</code></a> Use cross Go version compatible build tag syntax</li> <li><a href="https://github.com/stretchr/testify/commit/e798dc2763edab11eadc45df377ff160c6c86fd1"><code>e798dc2</code></a> Add docs on 1.17 build tags</li> <li><a href="https://github.com/stretchr/testify/commit/83198c2c50a6190cf9b038c485c65c5ed8b6cd3a"><code>83198c2</code></a> assert: guard CanConvert call in backward compatible wrapper</li> <li><a href="https://github.com/stretchr/testify/commit/087b655c75372ea14309c2df573a2280c54afac6"><code>087b655</code></a> assert: allow comparing time.Time</li> <li><a href="https://github.com/stretchr/testify/commit/7bcf74e94f95af11a6a7c0b9a5d9a719605d4faa"><code>7bcf74e</code></a> fix msgAndArgs forwarding</li> <li><a href="https://github.com/stretchr/testify/commit/c29de713426fdf9068696c483705fdbb24a815ac"><code>c29de71</code></a> add tests for correct msgAndArgs forwarding</li> <li><a href="https://github.com/stretchr/testify/commit/f87e2b211992baaf0251ae5ad1a530aaa9266570"><code>f87e2b2</code></a> Update builds</li> <li><a href="https://github.com/stretchr/testify/commit/ab6dc3262822ed562480c19876b0257ace761e3e"><code>ab6dc32</code></a> fix linting errors in /assert package</li> <li><a href="https://github.com/stretchr/testify/commit/edff5a049b1c4eacd84bec25bcf7e7852b7c1163"><code>edff5a0</code></a> fix funtion name</li> <li>Additional commits viewable in <a href="https://github.com/stretchr/testify/compare/v1.7.0...v1.7.1">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
Key-Value Database
Databases supporting mappings of arbitrary byte sequences.
Interfaces
The database interface types consist of objects to encapsulate the singular connection to the DB, transactions being made to it, historical version state, and iteration.
DBConnection
This interface represents a connection to a versioned key-value database. All versioning operations are performed using methods on this type.
- The
Versionsmethod returns aVersionSetwhich represents an immutable view of the version history at the current state. - Version history is modified via the
{Save,Delete}Versionmethods. - Operations on version history do not modify any database contents.
DBReader, DBWriter, and DBReadWriter
These types represent transactions on the database contents. Their methods provide CRUD operations as well as iteration.
- Writeable transactions call
Commitflushes operations to the source DB. - All open transactions must be closed with
DiscardorCommitbefore a new version can be saved on the source DB. - The maximum number of safely concurrent transactions is dependent on the backend implementation.
- A single transaction object is not safe for concurrent use.
- Write conflicts on concurrent transactions will cause an error at commit time (optimistic concurrency control).
Iterator
- An iterator is invalidated by any writes within its
Domainto the source transaction while it is open. - An iterator must call
Closebefore its source transaction is closed.
VersionSet
This represents a self-contained and immutable view of a database's version history state. It is therefore safe to retain and conccurently access any instance of this object.
Implementations
In-memory DB
The in-memory DB in the db/memdb package cannot be persisted to disk. It is implemented using the Google btree library.
- This currently does not perform write conflict detection, so it only supports a single open write-transaction at a time. Multiple and concurrent read-transactions are supported.
BadgerDB
A BadgerDB-based backend. Internally, this uses BadgerDB's "managed" mode for version management. Note that Badger only recognizes write conflicts for rows that are read after a conflicting transaction was opened. In other words, the following will raise an error:
tx1, tx2 := db.Writer(), db.ReadWriter()
key := []byte("key")
tx2.Get(key)
tx1.Set(key, []byte("a"))
tx2.Set(key, []byte("b"))
tx1.Commit() // ok
err := tx2.Commit() // err is non-nil
But this will not:
tx1, tx2 := db.Writer(), db.ReadWriter()
key := []byte("key")
tx1.Set(key, []byte("a"))
tx2.Set(key, []byte("b"))
tx1.Commit() // ok
tx2.Commit() // ok
RocksDB
A RocksDB-based backend. Internally this uses OptimisticTransactionDB to allow concurrent transactions with write conflict detection. Historical versioning is internally implemented with Checkpoints.