@OnlyForTest
    LogEntry getEntryFromDB(final long index) throws IOException, RocksDBException {
      final byte[] keyBytes = getKeyBytes(index);
      final byte[] bs = onDataGet(index, getValueFromRocksDB(keyBytes));
      if (bs != null) {
          final LogEntry entry = this.logEntryDecoder.decode(bs);
          if (entry != null) {
              return entry;
          } else {
              LOG.error("Bad log entry format for index={}, the log data is: {}.", index, BytesUtil.toHex(bs));
              // invalid data remove? TODO
              return null;
          }
      }
      return null;
    }
Execute write batch template.

@param template write batch template
jraft-core/src/main/java/com/alipay/sofa/jraft/storage/impl/RocksDBLogStorage.java