You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 9, 2019. It is now read-only.
Currently there's no way to prevent *bolt.Tx.Size() from referring to nilTx.meta or Tx.db since meta and db fields are unexported. etcd calls this method only for internal consistency checking, so I doubt anyone would face this issue in production. But once it happens, it panics the whole node, and there's nothing that we can do, as an external project importing boltdb.
@chrsm We try not to commit too often batching our commits, if I understand your comment correctly.
On second thought, we might just call tx, err = db.Begin(true) before calling tx.Size, so that we just update the tx.meta and tx.db with new reference.
Hello,
Currently there's no way to prevent
*bolt.Tx.Size()
from referring tonil
Tx.meta
orTx.db
sincemeta
anddb
fields are unexported. etcd calls this method only for internal consistency checking, so I doubt anyone would face this issue in production. But once it happens, it panics the whole node, and there's nothing that we can do, as an external project importing boltdb.Here's how
invalid memory address
happens in etcdWe have
Hash
method that commits*bolt.Tx
, which calls https://github.com/boltdb/bolt/blob/master/tx.go#L228And
*bolt.Tx
callstx.close()
, which clears these referencesFollowing
*bolt.Tx.Size()
calls would panic becausetx.meta == nil && tx.db == nil
Way to reproduce:
Am I missing anything? Or could we add a method just to tell
tx.meta == nil || tx.db == nil
, so that external projects can skipSize
call?Thanks a lot!
The text was updated successfully, but these errors were encountered: