aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2015-04-23 08:41:13 -0700
committerBen Johnson <benbjohnson@yahoo.com>2015-04-23 08:41:13 -0700
commit8a2a9b2eb7123c41ea752bab494ff046909e9473 (patch)
treed57900f03fca8718bca91e0d424352e38a1c5308
parentMerge pull request #352 from benbjohnson/cli (diff)
parentAdded Freehold to the projects list in README. (diff)
downloaddedo-8a2a9b2eb7123c41ea752bab494ff046909e9473.tar.gz
dedo-8a2a9b2eb7123c41ea752bab494ff046909e9473.tar.xz
Merge pull request #356 from timshannon/master
Added Freehold to the projects list in README + Transaction Documentation change
-rw-r--r--README.md1
-rw-r--r--tx.go6
2 files changed, 5 insertions, 2 deletions
diff --git a/README.md b/README.md
index 401a757..50f5eee 100644
--- a/README.md
+++ b/README.md
@@ -587,5 +587,6 @@ Below is a list of public, open source projects that use Bolt:
* [SkyDB](https://github.com/skydb/sky) - Behavioral analytics database.
* [Seaweed File System](https://github.com/chrislusf/weed-fs) - Highly scalable distributed key~file system with O(1) disk read.
* [InfluxDB](http://influxdb.com) - Scalable datastore for metrics, events, and real-time analytics.
+* [Freehold](http://tshannon.bitbucket.org/freehold/) - An open, secure, and lightweight platform for your files and data.
If you are using Bolt in a project please send a pull request to add it to the list.
diff --git a/tx.go b/tx.go
index fda6a21..3179c71 100644
--- a/tx.go
+++ b/tx.go
@@ -127,7 +127,8 @@ func (tx *Tx) OnCommit(fn func()) {
}
// Commit writes all changes to disk and updates the meta page.
-// Returns an error if a disk write error occurs.
+// Returns an error if a disk write error occurs, or if Commit is
+// called on a read-only transaction.
func (tx *Tx) Commit() error {
_assert(!tx.managed, "managed tx commit not allowed")
if tx.db == nil {
@@ -203,7 +204,8 @@ func (tx *Tx) Commit() error {
return nil
}
-// Rollback closes the transaction and ignores all previous updates.
+// Rollback closes the transaction and ignores all previous updates. Read-only
+// transactions must be rolled back and not committed.
func (tx *Tx) Rollback() error {
_assert(!tx.managed, "managed tx rollback not allowed")
if tx.db == nil {