hudi icon indicating copy to clipboard operation
hudi copied to clipboard

[SUPPORT] Caused by: java.lang.IllegalArgumentException: Cannot use marker based rollback strategy on completed instant

Open LitteCandy0511 opened this issue 3 years ago • 8 comments

Caused by: java.lang.IllegalArgumentException: Cannot use marker based rollback strategy on completed instant:[20220727185451835__commit__COMPLETED] at org.apache.hudi.common.util.ValidationUtils.checkArgument(ValidationUtils.java:40) at org.apache.hudi.table.action.rollback.BaseRollbackActionExecutor.(BaseRollbackActionExecutor.java:93) at org.apache.hudi.table.action.rollback.BaseRollbackActionExecutor.(BaseRollbackActionExecutor.java:73) at org.apache.hudi.table.action.rollback.CopyOnWriteRollbackActionExecutor.(CopyOnWriteRollbackActionExecutor.java:48) at org.apache.hudi.table.HoodieJavaCopyOnWriteTable.rollback(HoodieJavaCopyOnWriteTable.java:236) at org.apache.hudi.client.BaseHoodieWriteClient.rollback(BaseHoodieWriteClient.java:767) ... 11 more

I use java client hudi-0.11.0 version, when data is large, hudi client produces the above error, could anyone help?

LitteCandy0511 avatar Jul 27 '22 11:07 LitteCandy0511

@yihua @danny0405 could help ?

LitteCandy0511 avatar Jul 28 '22 09:07 LitteCandy0511

@jtchen-study can you share the Hudi configs and the setup you use for Java client?

yihua avatar Jul 29 '22 00:07 yihua

@yihua yes , thanks for your reply

public static HoodieWriteConfig buildCfg(String tablePath, String tableSchema, String tableName) { return HoodieWriteConfig.newBuilder().withPath(tablePath) .withSchema(tableSchema) .withFileSystemViewConfig(FileSystemViewStorageConfig.newBuilder() .withStorageType(FileSystemViewStorageType.MEMORY) .build()) .withEmbeddedTimelineServerEnabled(false) .withAutoCommit(true) .withWriteConcurrencyMode(WriteConcurrencyMode.SINGLE_WRITER) .withMarkersType(MarkerType.DIRECT.toString()) .withEngineType(EngineType.JAVA) .forTable(tableName) .withIndexConfig(HoodieIndexConfig.newBuilder() .withIndexType(HoodieIndex.IndexType.BLOOM).build()) .withCompactionConfig(HoodieCompactionConfig.newBuilder() .withAutoClean(false) .withAutoArchive(false) .build()) .build(); }

LitteCandy0511 avatar Jul 29 '22 08:07 LitteCandy0511

@yihua i am trying to develop a hudi writer plugin into DATAX, but i found that java client have some performance issue, besides the above one issue, do you have any suggession about perfermance enhance? as i know that java client does not support multi thread

LitteCandy0511 avatar Jul 29 '22 08:07 LitteCandy0511

The validation is legitimate, i.e. for a completed instant the marker dir is removed, so rollback cannot be done based on markers. Just to go past this issue, you can disable hoodie.rollback.using.markers (https://hudi.apache.org/docs/configurations#hoodierollbackusingmarkers). To fix this properly, I would suggest that Hudi either falls back to ListingBasedRollbackStrategy in such cases, or fails fast (at the time of scheduling rollback itself so that users can disable rollback using markers before rollback plan is written). @yihua wdyt?

codope avatar Aug 04 '22 07:08 codope

@jtchen-study Ideally, rollback is triggered only for failed writes. As such fallback to listing-based rollback should be safe but we need to understand how rollback got triggered for completed instant. Can you describe the sequence of events that happened and also the setup. Steps to reproduce would be very helpful. Is this a single-writer or multi-writer scenario? I've create HUDI-4550 to track the investigation.

codope avatar Aug 05 '22 06:08 codope

from the configs, looks like a single writer.

nsivabalan avatar Aug 05 '22 18:08 nsivabalan

We have put in a fix for this https://github.com/apache/hudi/pull/6313 Can you give that a try and let us know if it resolves the issue.

nsivabalan avatar Aug 09 '22 18:08 nsivabalan

closing the issue as we have the fix with 0.12. thanks for reaching out. appreciate you keeping the community buzzing.

nsivabalan avatar Aug 16 '22 04:08 nsivabalan

The validation is legitimate, i.e. for a completed instant the marker dir is removed, so rollback cannot be done based on markers. Just to go past this issue, you can disable hoodie.rollback.using.markers (https://hudi.apache.org/docs/configurations#hoodierollbackusingmarkers). To fix this properly, I would suggest that Hudi either falls back to ListingBasedRollbackStrategy in such cases, or fails fast (at the time of scheduling rollback itself so that users can disable rollback using markers before rollback plan is written). @yihua wdyt?

Does disabling 'hoodie.rollback.using.markers' make rollback inefficient?

tangqigithub avatar Sep 21 '22 02:09 tangqigithub