-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: singer_sdk.exceptions.InvalidStreamSortException: Unsorted data detected in stream. Latest value '24676548053040' is smaller than previous max '24676550681472'.
#297
Comments
Actually, it looks like I had a config error: my password field was empty in the YAML ( |
weird indeed 😅. thanks for reporting your solution! |
Okay I still have the issue in the end 😭 I isolated the command (with all the necessary statefiles/property files) that crashes so I can easily reproduce. Is there something I should do to help debugging? |
Okay, I found the issue. I used this to make all tables LOG_BASED: metadata:
"*":
replication_method: LOG_BASED But then I got the following error:
To solve the issue, I manually added the replication key: metadata:
"*":
replication_method: LOG_BASED
replication_key: _sdc_lsn But then it threw the error I mentionned:
I was able to fix the error by removing the "*" metadata, and instead specifying: config:
default_replication_method: LOG_BASED I think there are a few errors that definitely should not happen here, but at least I've got my fix. |
Nice @florian-ernst-alan , we should dissect this and make issues for the things that shouldn't have happened here. @sebastianswms can you take peek |
Aaaand actually config:
default_replication_method: LOG_BASED this does not apply the LOG_BASED replication mode to my table (statefile is empty at the end, and subsequent run re-imports everything). |
Okay, looks like Postgres does not guarantee WAL messages are ordered. Indeed, I manually queried my WAL logs and 4 of them are out-of-order, raising the error I see on Meltano. Can we relax the |
@florian-ernst-alan FYI I opened #301 to patch this behavior. UPDATE: Ready to be tested on |
When trying to use
LOG_BASED
replication, the import randomly fails with the following error message:Tap configuration:
Command is:
meltano run tap-postgres--metabase-incremental target-snowflake
If I remove the "culprit" stream
metabase-field
, then the next one in alphabetical order will fail with the same error message.Postgres version is 12.
It's super annoying as there's 0 reason for this to even happen 😅
The text was updated successfully, but these errors were encountered: