code: func (tx *transaction) close() {
  	tx.closed = true
  
  	// Clear pending blocks that would have been written on commit.
  	tx.pendingBlocks = nil
  	tx.pendingBlockData = nil
  
  	// Clear pending keys that would have been written or deleted on commit.
  	tx.pendingKeys = nil
  	tx.pendingRemove = nil
  
  	// Release the snapshot.
  	if tx.snapshot != nil {
  		tx.snapshot.Release()
  		tx.snapshot = nil
  	}
  
  	tx.db.closeLock.RUnlock()
  
  	// Release the writer lock for writable transactions to unblock any
  	// other write transaction which are possibly waiting.
  	if tx.writable {
  		tx.db.writeLock.Unlock()
  	}
  }
docs: // close marks the transaction closed then releases any pending data, the
  // underlying snapshot, the transaction read lock, and the write lock when the
  // transaction is writable.