Open ebyhr opened 2 months ago
The following stacktrace points out that the JSON content read is corrupted:
Caused by: java.lang.IllegalArgumentException: Invalid JSON bytes for [simple type, class io.trino.plugin.deltalake.statistics.ExtendedStatistics]
at io.airlift.json.JsonCodec.fromJson(JsonCodec.java:196)
at io.trino.plugin.deltalake.statistics.MetaDirStatisticsAccess.readExtendedStatistics(MetaDirStatisticsAccess.java:75)
at io.trino.plugin.deltalake.statistics.MetaDirStatisticsAccess.readExtendedStatistics(MetaDirStatisticsAccess.java:65)
at io.trino.plugin.deltalake.statistics.CachingExtendedStatisticsAccess.lambda$readExtendedStatistics$0(CachingExtendedStatisticsAccess.java:63)
The issue reported there seems to be related with the way that LocalOutputFile
writes content to the persistence:
The overwriting of the content is not done in an atomical manner.
We need to rethink the implementation of createOrOverwrite()
method from LocalOutputFile
used to interact in tests with the local file storage.
cc @electrum
We could change this to write to a temporary file and then rename. We could name the temporary file .tmp.$RANDOM.$ORIGINAL
Reoccured on master https://github.com/trinodb/trino/actions/runs/9357870915/job/25758647303
@findinpath Do you have any updates?
https://github.com/trinodb/trino/actions/runs/8845096149/job/24288361644