code: func (s *LDBStore) writeBatch(b *dbBatch, wFlag uint8) error {
  	if wFlag&wEntryCnt > 0 {
  		b.Put(keyEntryCnt, U64ToBytes(s.entryCnt))
  	}
  	if wFlag&wIndexCnt > 0 {
  		b.Put(keyDataIdx, U64ToBytes(s.dataIdx))
  	}
  	if wFlag&wAccessCnt > 0 {
  		b.Put(keyAccessCnt, U64ToBytes(s.accessCnt))
  	}
  	l := b.Len()
  	if err := s.db.Write(b.Batch); err != nil {
  		return fmt.Errorf("unable to write batch: %v", err)
  	}
  	log.Trace(fmt.Sprintf("batch write (%d entries)", l))
  	return nil
  }
docs: // must be called non concurrently