MCPcopy
hub / github.com/hyperledger/fabric / Unlock

Method Unlock

common/ledger/util/leveldbhelper/leveldb_helper.go:235–244  ·  view source on GitHub ↗

Unlock releases a previously acquired lock. We achieve this by closing the previously opened db. FileUnlock can be called multiple times.

()

Source from the content-addressed store, hash-verified

233// Unlock releases a previously acquired lock. We achieve this by closing
234// the previously opened db. FileUnlock can be called multiple times.
235func (f *FileLock) Unlock() {
236 if f.db == nil {
237 return
238 }
239 if err := f.db.Close(); err != nil {
240 logger.Warningf("unable to release the lock on file %s: %s", f.filePath, err)
241 return
242 }
243 f.db = nil
244}

Callers 15

NewStoreProviderFunction · 0.95
DropFunction · 0.95
ResetAllKVLedgersFunction · 0.95
UpgradeDBsFunction · 0.95
RollbackKVLedgerFunction · 0.95
RebuildDBsFunction · 0.95
UnjoinChannelFunction · 0.95
pauseOrResumeChannelFunction · 0.95
TestFileLockFunction · 0.95
measureTPSFunction · 0.80

Calls 2

CloseMethod · 0.65
WarningfMethod · 0.65

Tested by 15

TestFileLockFunction · 0.76
measureTPSFunction · 0.64
FetchStateMethod · 0.64
thatMapsToMethod · 0.64
AccessFilterMethod · 0.64
CommitLegacyMethod · 0.64