HADOOP-19557 S3A: S3ABlockOutputStream to never log/reject hflush() calls#7662
Conversation
…alls Calls to Syncable.hflush() on S3ABlockOutputStream instances are logged at debug and the statistics counter upgraded
|
🎊 +1 overall
This message was automatically generated. |
| statistics.hflushInvoked(); | ||
| handleSyncableInvocation(); | ||
| // do not reject these, but downgrade to a no-oop | ||
| LOG.debug("Hflush invoked"); |
There was a problem hiding this comment.
@steveloughran is parquet the only reader calling hflush? think this changes behaviour for everyone.. is this something we need to care about?
There was a problem hiding this comment.
look at the fs spec. we say "don't use the api and highlight the inconsistent outcomes"
The semantics of hflush say "visible to all" but no persistence, so it's not changing any durability semantics. Are we changing the visibility? we're certainly not meeting them.
I remember having a long talk with others about hflush, as in "what does it do?" -the answer is "nothing you can rely on".
when exceptions are downgraded (default) all that happens is the log message is removed, so reducing confusion.
when exceptions are rejected, the failure goes away. The one I want to fail here is hsync(), and at holds. AFAIK nobody runs with that flag on except for some of our test setups.
Syncable.hflush()
Flush out the data in client's user buffer. After the return of
this call, new readers will see the data. The hflush() operation
does not contain any guarantees as to the durability of the data. only
its visibility.
Thus implementations may cache the written data in memory
—visible to all, but not yet persisted.
…alls (apache#7662) S3A output streams no longer logs warnings on use of hflush() or, if fs.s3a.downgrade.syncable.exceptions = false, raises an UnsupportedOperationException . hsync() is still reported with a warning or rejected. That method is absolutely unsupported when writing to S3. Contributed by Steve Loughran
…calls (#7662) S3A output streams no longer logs warnings on use of hflush() or, if fs.s3a.downgrade.syncable.exceptions = false, raises an UnsupportedOperationException . hsync() is still reported with a warning or rejected. That method is absolutely unsupported when writing to S3. Contributed by Steve Loughran
Calls to Syncable.hflush() on S3ABlockOutputStream instances are logged at debug and the statistics counter upgraded
How was this patch tested?
-Dparallel-tests -DtestsThreadCount=9For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?