Hi. I am seeking help on why my sync failed. See...
# replication-troubleshooting
r
Hi. I am seeking help on why my sync failed. See the attached logs. The source is pulling data from a large table in MySQL table and writing to S3 destination. I can see the entry "Exported 6500361 of 196414794 records for table 'dn3m.memberclaim' after 015231.658" at line 16974 of the log file. Shortly after on line 17026 of the log, looks like the first attempt fails but there is no error message to indicate why the worker failed. How can I determine why the sync failed?
I have been working with DevOps, and we think the problem is occurring because the worker nodes are on spot instances in the kubernetes cluster. We have some large tables to sync, and the spot instances are reclaimed. DevOps is converting the worker nodes to on-demand instances, and we will test the sync again.
n
Hi Ryan! Thanks for the update - please let me know how the test sync goes!
r
Working with DevOps, we were able to complete the initial test sync with Airbyte on kubernetes. We have some big tables to load initially, and the initial sync took almost 2 days. It is test afterall, and we anticipate prod syncing faster with bigger resources.
Not sure if I should start a new thread or not. I have question about the new_data query in the CTE for creating the temp table for sync mode incremental | Deduped + History. The subquery is listed in the code snippet below. The original sync started on 2023-03-06 160731.849000-06:00, and after the initial sync completed as mentioned in the previous messages, I am still seeing the condition reference the initial start date. This MemberClaim table is 211 million rows, and if we have load 211 million rows + any changes, this will become too expensive. Why is the _AIRBYTE_EMITTED_AT condition still referencing the original start date of the initial sync? Did I miss something in the configuration of the connection?
Copy code
new_data as (
    -- retrieve incremental "new" data
    select
        *
    from "AIRBYTE_TEST"._AIRBYTE_LANDING_ZONE."SRC_MEMBERCLAIM_STG"
    -- SRC_MEMBERCLAIM from "AIRBYTE_TEST".LANDING_ZONE._AIRBYTE_RAW_SRC_MEMBERCLAIM
    where 1 = 1
    
    
and cast(_AIRBYTE_EMITTED_AT as 
    timestamp with time zone
) >=
    cast('2023-03-06 16:07:31.849000-06:00' as 
    timestamp with time zone
)
This is the log file the second sync after the initial sync completed. Why is the date used to constrain on _AIRBYTE_EMITTED_AT not changing? The time '2023-03-06 160731.849000-06:00' is the time the original sync started, and my problem is the subsequent syncs are still pulling 211 million rows from MemberClaim even though there have not been any new changes. I need to understand why this happening and what I am doing wrong. We cannot afford to sync big tables like this. Please help.
I also wanted to mention that I am using an S3 bucket as the storage on the Snowflake connector, and the files on S3 are purged after each run. Does have any impact on why the date constraint is not advanced for the _AIRBYTE_EMITTED_AT condition?
Is the incremental sync getting the max emitted date from the table? The following query returns 2023-03-06T160731.849-06:00 which seems to be the date used by the next sync. But there are no changes in the MySQL bin log. The console shows 0 rows updated after 2h 50 min for subsequent syncs. If there are no changes in the database bin log, why is the sync processing all these rows? I was expecting it to just quit. Please advise.
Copy code
select max(_AIRBYTE_EMITTED_AT)
from airbyte_test.landing_zone.src_memberclaim_scd
;
I executed an update statement on the big table, and I am now seeing _AIRBYTE_EMITTED_AT as 2023-03-09 004319.209 -0600. So the sync is using the max emitted date from each table to determine what to pull from stage? If so this will not be an issue in prod because the table updates are daily.
n
Hi Ryan, I'm looking into this, hold on a bit
The max
_airbyte_emitted_at
date is taken from the destination table. This is achieved by extracting the largest
_airbyte_emitted_at
value from the destination table and only selecting records for normalization from the raw table that have an
_airbyte_emitted_at
value that is greater than or equal to this value. For more information, take a look at the Airbyte documentation. Let me know if this helps!
👍 1