<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Transaction log integrity issue in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/transaction-log-integrity-issue/m-p/166229#M55547</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/198892"&gt;@analyticsnerd&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Delta maintains a checksum file&amp;nbsp;(&lt;STRONG&gt;.crc&lt;/STRONG&gt;) for each committed version, along with the commit log (&lt;STRONG&gt;.json&lt;/STRONG&gt;), recording the table’s file count, total size, and a distribution of file sizes (a histogram that buckets files by size). For performance, this checksum is maintained incrementally: each commit’s checksum is derived from the previous commit’s checksum plus the changes in the new commit, rather than by re-scanning the whole table.This lets the runtime know the exact shape of the table at any version without listing every file each time&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;To ensure the stored checksum remains consistent with the actual table state, Delta performs an integrity check. When a snapshot is loaded, Delta reconstructs the table state from the transaction log and compares the resulting state with the stored checksum for that version. If the two do not match, Delta raises the &lt;STRONG&gt;DELTA_TXN_LOG_FAILED_INTEGRITY&lt;/STRONG&gt; error and refuses to proceed, so that no operation runs on a version whose recorded state cannot be trusted.&lt;/LI&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;LI&gt;In your case, you will need to scan the checksum files inside the Tx. log directory of the table and see when the first checksum failure happened, and which commit created that .&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P class="ui-markdown__paragraph ui-z80ra4 ui-uu7i3w ui-1nhcn8o ui-j7cesy ui-13faqbe ui-14l7nz5 ui-zboxd6 ui-19d5a1n ui-bpgzfc"&gt;Likely causes include:&lt;/P&gt;
&lt;OL class="ui-markdown__list ui-78zum5 ui-dt5ytf ui-1ae8yn7 ui-13vk20g ui-1e8yfua ui-j7cesy ui-1bae07f"&gt;
&lt;LI class="ui-markdown__list-item ui--default-marker ui-exx8yu ui-1xpa7k ui-18d9i69 ui-1uhho1l ui-13faqbe ui-ez2fb" data-md-list-item=""&gt;The same file path was committed twice.&amp;nbsp;Since the writer is an external writer, it seems like one file was re-committed/rewritten again by the external REST client, and that has caused the mismatch.&lt;/LI&gt;
&lt;LI class="ui-markdown__list-item ui--default-marker ui-exx8yu ui-1xpa7k ui-18d9i69 ui-1uhho1l ui-13faqbe ui-ez2fb" data-md-list-item=""&gt;The checksum was updated incrementally as if the file were new, even though that path already existed.&lt;/LI&gt;
&lt;LI class="ui-markdown__list-item ui--default-marker ui-exx8yu ui-1xpa7k ui-18d9i69 ui-1uhho1l ui-13faqbe ui-ez2fb" data-md-list-item=""&gt;A malformed external commit produced incorrect Add/Remove file accounting.&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Recovery steps:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;1. To immediately mitigate the issue, could you please set the below on your jobs to resume ingestion&amp;nbsp;&amp;nbsp;&lt;CODE&gt;spark.databricks.delta.checksum.mismatch.fatal=false &lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;Alternatively, run the affected reads on non-Photon compute. The validation that raises this error is performed on Photon’s optimised read path; classic compute reads the table without it.&lt;/P&gt;
&lt;P&gt;If you need help scanning the tx. log to identify teh corrupt CRC and the extra 1 file which was re-added, I suggest you raise a support ticket with the Databricks team to check the issue further&lt;/P&gt;</description>
    <pubDate>Sat, 22 Aug 2026 14:56:36 GMT</pubDate>
    <dc:creator>K_Anudeep</dc:creator>
    <dc:date>2026-08-22T14:56:36Z</dc:date>
    <item>
      <title>Transaction log integrity issue</title>
      <link>https://community.databricks.com/t5/data-engineering/transaction-log-integrity-issue/m-p/166225#M55544</link>
      <description>&lt;P&gt;Delta transaction log for one of our tables which is being written to by a Kafka Connect IcebergSinkConnector via the Unity Catalog Iceberg REST endpoint, is currently corrupted and is failing when trying to read with the below exception&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ERROR&lt;/STRONG&gt;:&lt;BR /&gt;com.databricks.sql.transaction.tahoe.DeltaIllegalStateException: [DELTA_TXN_LOG_FAILED_INTEGRITY] The transaction log has failed integrity checks. Failed verification at version 5618 of:&lt;BR /&gt;FileSizeHistogram mismatch in file sizes&lt;BR /&gt;FileSizeHistogram mismatch in file counts&lt;BR /&gt;Table size (bytes) - Expected: 5110912734 Computed: 5110843864&lt;BR /&gt;Number of files - Expected: 14624 Computed: 14623&lt;/P&gt;&lt;P&gt;could you please help understand what error is this and what do we need to do to fix this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Aug 2026 13:58:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/transaction-log-integrity-issue/m-p/166225#M55544</guid>
      <dc:creator>analyticsnerd</dc:creator>
      <dc:date>2026-08-22T13:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Transaction log integrity issue</title>
      <link>https://community.databricks.com/t5/data-engineering/transaction-log-integrity-issue/m-p/166229#M55547</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/198892"&gt;@analyticsnerd&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Delta maintains a checksum file&amp;nbsp;(&lt;STRONG&gt;.crc&lt;/STRONG&gt;) for each committed version, along with the commit log (&lt;STRONG&gt;.json&lt;/STRONG&gt;), recording the table’s file count, total size, and a distribution of file sizes (a histogram that buckets files by size). For performance, this checksum is maintained incrementally: each commit’s checksum is derived from the previous commit’s checksum plus the changes in the new commit, rather than by re-scanning the whole table.This lets the runtime know the exact shape of the table at any version without listing every file each time&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;To ensure the stored checksum remains consistent with the actual table state, Delta performs an integrity check. When a snapshot is loaded, Delta reconstructs the table state from the transaction log and compares the resulting state with the stored checksum for that version. If the two do not match, Delta raises the &lt;STRONG&gt;DELTA_TXN_LOG_FAILED_INTEGRITY&lt;/STRONG&gt; error and refuses to proceed, so that no operation runs on a version whose recorded state cannot be trusted.&lt;/LI&gt;
&lt;/UL&gt;
&lt;UL&gt;
&lt;LI&gt;In your case, you will need to scan the checksum files inside the Tx. log directory of the table and see when the first checksum failure happened, and which commit created that .&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;P class="ui-markdown__paragraph ui-z80ra4 ui-uu7i3w ui-1nhcn8o ui-j7cesy ui-13faqbe ui-14l7nz5 ui-zboxd6 ui-19d5a1n ui-bpgzfc"&gt;Likely causes include:&lt;/P&gt;
&lt;OL class="ui-markdown__list ui-78zum5 ui-dt5ytf ui-1ae8yn7 ui-13vk20g ui-1e8yfua ui-j7cesy ui-1bae07f"&gt;
&lt;LI class="ui-markdown__list-item ui--default-marker ui-exx8yu ui-1xpa7k ui-18d9i69 ui-1uhho1l ui-13faqbe ui-ez2fb" data-md-list-item=""&gt;The same file path was committed twice.&amp;nbsp;Since the writer is an external writer, it seems like one file was re-committed/rewritten again by the external REST client, and that has caused the mismatch.&lt;/LI&gt;
&lt;LI class="ui-markdown__list-item ui--default-marker ui-exx8yu ui-1xpa7k ui-18d9i69 ui-1uhho1l ui-13faqbe ui-ez2fb" data-md-list-item=""&gt;The checksum was updated incrementally as if the file were new, even though that path already existed.&lt;/LI&gt;
&lt;LI class="ui-markdown__list-item ui--default-marker ui-exx8yu ui-1xpa7k ui-18d9i69 ui-1uhho1l ui-13faqbe ui-ez2fb" data-md-list-item=""&gt;A malformed external commit produced incorrect Add/Remove file accounting.&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Recovery steps:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;1. To immediately mitigate the issue, could you please set the below on your jobs to resume ingestion&amp;nbsp;&amp;nbsp;&lt;CODE&gt;spark.databricks.delta.checksum.mismatch.fatal=false &lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;Alternatively, run the affected reads on non-Photon compute. The validation that raises this error is performed on Photon’s optimised read path; classic compute reads the table without it.&lt;/P&gt;
&lt;P&gt;If you need help scanning the tx. log to identify teh corrupt CRC and the extra 1 file which was re-added, I suggest you raise a support ticket with the Databricks team to check the issue further&lt;/P&gt;</description>
      <pubDate>Sat, 22 Aug 2026 14:56:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/transaction-log-integrity-issue/m-p/166229#M55547</guid>
      <dc:creator>K_Anudeep</dc:creator>
      <dc:date>2026-08-22T14:56:36Z</dc:date>
    </item>
  </channel>
</rss>

