From 03ecfe49f1369f1813036dff6ee562d25825abee Mon Sep 17 00:00:00 2001 From: "Gerasimos (Makis) Maropoulos" Date: Wed, 27 Dec 2017 03:35:01 +0200 Subject: [PATCH] update badger db to its latest version and remove it from gopkg.toml/lock because it's vendored inside the sessionsdb/badger itself, this should fix https://github.com/kataras/iris/issues/848 Former-commit-id: 006b1d4d3c8dbe09b448ff33dade8978fddef4eb --- Gopkg.lock | 30 --------------------------- Gopkg.toml | 20 ------------------ sessions/sessiondb/badger/database.go | 2 +- 3 files changed, 1 insertion(+), 51 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 5900c466..0ce0f79b 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -31,18 +31,6 @@ packages = [".","ast","lexer","parser"] revision = "72acac2207479d21dd45898c2a4264246c818148" -[[projects]] - name = "github.com/boltdb/bolt" - packages = ["."] - revision = "2f1ce7a837dcb8da3ec595b1dac9d0632f0f99e8" - version = "v1.3.1" - -[[projects]] - branch = "master" - name = "github.com/dgraph-io/badger" - packages = ["."] - revision = "d8b951787ebe5c42286475df8a3dea25045bda1a" - [[projects]] name = "github.com/davecgh/go-spew" packages = ["spew"] @@ -67,12 +55,6 @@ packages = ["."] revision = "58f1f3387f7c57843ff829d92a759d08abe5a63f" -[[projects]] - branch = "master" - name = "github.com/garyburd/redigo" - packages = ["internal","redis"] - revision = "b925df3cc15d8646e9b5b333ebaf3011385aba11" - [[projects]] branch = "master" name = "github.com/gavv/monotime" @@ -91,12 +73,6 @@ packages = ["query"] revision = "53e6ce116135b80d037921a7fdd5138cf32d7a8a" -[[projects]] - name = "github.com/gorilla/websocket" - packages = ["."] - revision = "ea4d1f681babbce9545c9c5f3d5194a789c89f5b" - version = "v1.2.0" - [[projects]] name = "github.com/imkira/go-interpol" packages = ["."] @@ -223,12 +199,6 @@ revision = "69483b4bd14f5845b5a1e55bca19e954e827f1d0" version = "v1.1.4" -[[projects]] - branch = "master" - name = "github.com/syndtr/goleveldb" - packages = ["leveldb","leveldb/cache","leveldb/comparer","leveldb/errors","leveldb/filter","leveldb/iterator","leveldb/journal","leveldb/memdb","leveldb/opt","leveldb/storage","leveldb/table","leveldb/util"] - revision = "b89cc31ef7977104127d34c1bd31ebd1a9db2199" - [[projects]] branch = "master" name = "github.com/valyala/bytebufferpool" diff --git a/Gopkg.toml b/Gopkg.toml index c4ce9ad0..83a3a289 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -14,14 +14,6 @@ branch = "master" name = "github.com/aymerick/raymond" -[[constraint]] - branch = "master" - name = "github.com/boltdb/bolt" - -[[constraint]] - branch = "master" - name = "github.com/dgraph-io/badger" - [[constraint]] branch = "master" name = "github.com/eknkc/amber" @@ -34,14 +26,6 @@ branch = "master" name = "github.com/flosch/pongo2" -[[constraint]] - branch = "master" - name = "github.com/garyburd/redigo" - -[[constraint]] - name = "github.com/gorilla/websocket" - version = "1.2.0" - [[constraint]] branch = "master" name = "github.com/iris-contrib/formBinder" @@ -86,10 +70,6 @@ branch = "master" name = "github.com/satori/go.uuid" -[[constraint]] - branch = "master" - name = "github.com/syndtr/goleveldb" - [[constraint]] branch = "master" name = "github.com/valyala/bytebufferpool" diff --git a/sessions/sessiondb/badger/database.go b/sessions/sessiondb/badger/database.go index 2726c466..62552c27 100644 --- a/sessions/sessiondb/badger/database.go +++ b/sessions/sessiondb/badger/database.go @@ -165,7 +165,7 @@ func (db *Database) sync(p sessions.SyncPayload) { txn := db.Service.NewTransaction(true) - err = txn.Set(bsid, s, 0x00) + err = txn.Set(bsid, s) if err != nil { txn.Discard() golog.Errorf("error while trying to save the session(%s) to the database: %v", p.SessionID, err)