Fix: Fix continuous event analytics export#23837
Merged
Merged
Conversation
luciano-fiandesio
requested review from
larshelge,
luciano-fiandesio and
maikelarabori
May 7, 2026 08:19
maikelarabori
approved these changes
May 7, 2026
maikelarabori
left a comment
Contributor
There was a problem hiding this comment.
Looks good @jason-p-pickering, just a minor suggestion.
Thx
| and ev.lastupdated < '${endDate}');""", | ||
| Map.of( | ||
| "tableName", qualify(table.getName()), | ||
| "tableName", qualify(table.getMainName()), |
Contributor
There was a problem hiding this comment.
Suggested change
| "tableName", qualify(table.getMainName()), | |
| "tableName", sqlBuilder.qualifyTable(getAnalyticsTableType().getTableName()) |
Contributor
There was a problem hiding this comment.
My suggestion follows the same standard already in use in the other "*AnalyticsTableManager" classes.
I believe it's more consistent.
luciano-fiandesio
approved these changes
May 7, 2026
|
This was referenced May 9, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Summary
Fixes two bugs in
JdbcEventAnalyticsTableManagerthat affect event analytics table updates.Bug 1 (regression, critical):
removeUpdatedData()was deleting from the staging master table (analytics_event_temp) instead of the live master(analytics_event). Because the staging table is the parent of _0_temp, the delete cascaded to the partition that had just been populated, thereby leaving it empty before the swap. The result was that newly created or updated events never appeared in analytics after a continuous (latest) run; only a full rebuild would surface them. Fix: use
table.getMainName()instead oftable.getName().Bug 2 (dormant): The
isSkipPrograms()ternary ingetRegularAnalyticsTables()was inverted. When a skip list was provided the function returned all programs, and when no skip list was provided it attempted to filter. Fix: swap the ternary branches to match the correct logic already present ingetLatestAnalyticsTables().Tests
Added two unit tests to
JdbcEventAnalyticsTableManagerTest:removeUpdatedDataTargetsLiveTable: verifies the DELETE SQL targets the live table, not the staging tablegetRegularAnalyticsTablesExcludesSkippedPrograms: verifies programs in skipPrograms are excluded from a regular analytics run