public void delete(RowData joinKey, byte[] elementBytes) throws IOException {
    final byte[] joinKeyBytes = serializeKey(joinKey);
    ByteArrayWrapper keyWrap = wrap(joinKeyBytes);
    if (guavaCache.getIfPresent(keyWrap) != null) {
      guavaCache.invalidate(keyWrap);
    }
    byte[] joinKeyAndPrimaryKeyBytes = Bytes.mergeByte(joinKeyBytes, elementBytes);
    if (rocksDB.get(columnFamilyName, joinKeyAndPrimaryKeyBytes) != null) {
      rocksDB.delete(columnFamilyName, joinKeyAndPrimaryKeyBytes);
    }
  }
Merge key and element into guava cache and rocksdb.
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/main/java/org/apache/amoro/flink/lookup/RocksDBSetState.java