[pull] master from DataDog:master - #450
Merged
Merged
Conversation
… database has no tables (#22880) * Fix schema collector silently dropping payloads when last database has no tables When the last database in the iteration order returns 0 rows from the schema query, the while loop is skipped and maybe_flush(is_last_payload=True) is never called. This causes all previously queued rows to be silently dropped — tables_count reflects the work done but payloads_count stays 0 and no metadata is submitted to the backend. This affects all DBMS implementations (SQL Server, Postgres, MySQL, Mongo) that use the shared SchemaCollector base class. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add changelog entry for schema collector flush fix Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Shorten comment on flush fix Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Simplify flush logic: separate final flush from per-row loop Instead of detecting is_last_payload inside the while loop (which fails when the last database returns 0 rows), the loop now only flushes on chunk size. The final flush always happens after the loop completes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Restore original comments in schema collector loop Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix final payload missing collection_payloads_count when chunk-size flushes drain the queue When payload_chunk_size is small enough to flush all rows during the loop, the post-loop flush must still send a final payload with collection_payloads_count so the backend knows the snapshot is complete. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Simplify fix: move is_last_payload out of while loop Instead of a separate post-loop flush, move the is_last_payload check and maybe_flush call outside the while loop but inside the for-database loop. This handles empty last databases without the potential empty payload issue. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* disk-integration-doc-typo-fix * Update disk/README.md Co-authored-by: Esther Kim <esther.kim@datadoghq.com> --------- Co-authored-by: Esther Kim <esther.kim@datadoghq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )