question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Iceberg specific files (manifest files, manifest list file, metadata file) are not created, only Flink specific manifest file is created

See original GitHub issue

[ Update on the issue - an updated description which describes the problem more accurately: Jan 12, 2021 ]

Hello, Iceberg community,

I’m facing an issue with metadata files in S3 for the Iceberg table. After the job was running for a while, and few times suspended via savepoints and started again, Flink only creates Flink specific manifest files, and Iceberg specific files are not created. Only in the next job suspension time, Flink will create Iceberg specific files and remove Flink specific manifest files.

Flink job consists of single Kafka source, mapper and a FlinkSink.

Iceberg Flink connector 0.10.0 version is used.

Flink job ingests data into S3, with a checkpointing interval of 1 hour.

Normal scenario - expected behavior every hour in the metadata folder 3 files are created:

  • Metadata file: 00001-180a83f3-c229-4ed5-a9dc-2f9c235f6d52.metadata.json
  • Manifest list file: snap-5807373598091371828-1-87p0b872-3f55-9b79-8cee-b1d354f2c378.avro
  • Manifest file: 39d0b872-4f56-4b79-8cee-c0a354f2c575-m0.avro

After a few successful checkpoints and the job is suspended via savepoint, the job started again: every hour in the metadata folder only a single file is created

  • Manifest file : 4c806ffdb03c41e09337b90f18781570-00000-0-466-00001.avro

The metadata file and manifest list file are NOT created or updated either.

This causes the issue of new data(partitions) not be available until the metadata and manifest list file is created.

When the next time the Flink job is suspended again (via savepoint), the Flink job will create Iceberg specific files for all missing checkpoints (thus the missing already ingested partitions will become visible Iceberg), and remove Flink specific manifest files, and then shut down the job.

============================ [BELOW is an outdated old description, please ignore]

Hello, Iceberg community,

I’m facing an issue with metadata files in S3 for the Iceberg table when bucket versioning is enabled for S3 bucket.

Iceberg Flink connector 0.10.0 version is used.

Flink job ingests data into S3, with a checkpointing interval of 1 hour.

for S3 bucket with versioning disabled: every hour in the metadata folder 3 files are created:

  • Metadata file: 00001-180a83f3-c229-4ed5-a9dc-2f9c235f6d52.metadata.json
  • Manifest list file: snap-5807373598091371828-1-87p0b872-3f55-9b79-8cee-b1d354f2c378.avro
  • Manifest file: 39d0b872-4f56-4b79-8cee-c0a354f2c575-m0.avro

for S3 bucket with versioning enabled: every hour in the metadata folder only a single file is created

  • Manifest file : 4c806ffdb03c41e09337b90f18781570-00000-0-466-00001.avro

The metadata file and manifest list file are NOT created or updated either.

This causes the issue of new data(partitions) not be available until the metadata and manifest list file is created.

If I restart the Flink job, the new metadata and manifest list file are created, and the missing partitions become visible again.

Few questions:

  1. Did anyone face a similar issue with the S3 bucket versioning?

  2. Why metadata files and manifest list files are not created/updated with every checkpoint?

  3. How can S3 bucket versioning impact the manifest file version? “-m0.avro” suffix V1 version vs “.avro” suffix V2 version

Thank you.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:23 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
elkhandcommented, Jan 29, 2021

Anyone facing the same issue, to bypass the issue until this bug is fixed on the Flink side: You do not need to fix corrupted metadata files where flink.max-committed-checkpoint-id is set to Long.MAX_VALUE.

Just follow this workflow for stateful upgrades going forward - this flow works as expected and you do not get corrupted metadata file anymore:

  • take manual savepoint, no job stopping or canceling ./bin/flink savepoint ${JOB_ID} /tmp/flink-savepoints
  • cancel your job
  • do your code changes, upload a new jar of your job
  • start your job with the last saved savepoint

After this flow, your flink.max-committed-checkpoint-id will be set to correct checkpointId .

1reaction
kezhuwcommented, Jan 25, 2021

Hi @elkhand, I have reported your investigation and my speculation in https://issues.apache.org/jira/browse/FLINK-21132. Hopefully, there will be response in next few days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[GitHub] [iceberg] kezhuw commented on issue #2033: Iceberg ...
[GitHub] [iceberg] kezhuw commented on issue #2033: Iceberg specific files (manifest files, manifest list file, metadata file) are not created, only Flink ......
Read more >
Spark Procedures - Apache Iceberg
Iceberg tracks each data file in a table. More data files leads to more metadata stored in manifest files, and small data files...
Read more >
How Iceberg works - Amazon EMR - AWS Documentation
Snapshots are listed in the metadata file, but the files in a snapshot are stored in separate manifest files. The atomic transitions from...
Read more >
Maintaining Iceberg Tables - Compaction, Expiring Snapshots ...
Note that any manifest lists, manifests, and data files ... possible is that a new metadata file is created with each update to...
Read more >
As cool as Iceberg - Ajith Shetty - Medium
Snapshot metadata file: This stores the table specifications like table schema, the partitioning columns and the path to the manifest list. Manifest list:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found