southernriver commented on PR #4507:
URL: https://github.com/apache/iceberg/pull/4507#issuecomment-1090998127
@kbendick Thank you. Manifest clean-up operation could throw
`OutOfMemoryError` , For Spark-Side, Job callback to SparkWrite.abort:
```
private void abort(WriterCommitMessage[] messages) {
Map<String, String> props = table.properties();
Tasks.foreach(files(messages))
.retry(PropertyUtil.propertyAsInt(props, COMMIT_NUM_RETRIES,
COMMIT_NUM_RETRIES_DEFAULT))
.exponentialBackoff(
PropertyUtil.propertyAsInt(props, COMMIT_MIN_RETRY_WAIT_MS,
COMMIT_MIN_RETRY_WAIT_MS_DEFAULT),
PropertyUtil.propertyAsInt(props, COMMIT_MAX_RETRY_WAIT_MS,
COMMIT_MAX_RETRY_WAIT_MS_DEFAULT),
PropertyUtil.propertyAsInt(props, COMMIT_TOTAL_RETRY_TIME_MS,
COMMIT_TOTAL_RETRY_TIME_MS_DEFAULT),
2.0 /* exponential */)
.throwFailureWhenFinished()
.run(file -> {
table.io().deleteFile(file.path().toString());
});
}
```
It would delete datafile. And then if we read from current snapshot,
`java.io.FileNotFoundException` would be thrown:
<img width="1554" alt="image"
src="https://user-images.githubusercontent.com/20614350/162104740-fb1339db-2f74-4394-802d-dbc443447a4d.png">
it's easy to reproduce this problem, you can just throw `OutOfMemoryError`
in try block.
` throw new OutOfMemoryError("oom");
`
BTW, I think clean-up is not necessary after committed success, and we can
catch all exception or error.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]