We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In using this at scale I see a hang in load() around line 90. I'm now testing a version that puts Update() after View():
func (s *Store) load(session *sessions.Session) (bool, error) { // exists represents whether a session data exists or not. var exists, expired bool id := []byte(session.ID) err := s.db.View(func(tx *bolt.Tx) error { bucket := tx.Bucket(s.config.DBOptions.BucketName) // Get the session data. data := bucket.Get(id) if data == nil { return nil } sessionData, err := shared.Session(data) if err != nil { return err } // Check the expiration of the session data. if shared.Expired(sessionData) { expired = true } exists = true dec := gob.NewDecoder(bytes.NewBuffer(sessionData.Values)) return dec.Decode(&session.Values) }) if expired { err := s.db.Update(func(txu *bolt.Tx) error { return txu.Bucket(s.config.DBOptions.BucketName).Delete(id) }) return false, err } return exists, err }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In using this at scale I see a hang in load() around line 90.
I'm now testing a version that puts Update() after View():
The text was updated successfully, but these errors were encountered: