Skip to content
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

Client Data Store Enhancements and Bug fixes #21

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

rtamalin
Copy link
Collaborator

Leverage foreign key cascaded delete constraints to ensure that deletion of reports triggers a cascaded delete of associated bundles, triggering cascaded deletes of associated bundles.

To support this we need to ensure that SQLite3 foreign_key processing is enabled when we open the SQLite3 based client data store. Similarly we want to enable Write Ahead Log (WAL) based journalling mode for our data store. These options will be automatically included in the SQLite3 data source specification if not already provided.

Cleanup the TelemetryProcessor and associated TelemetryCommon interface definitions, leveraging variadic functions to eliminate multiple similar methods. Similarly for the DatabaseStorer interface. Update associated implementations to match revised interface definitions and remove any newly redundant methods.

Implement helper functions that can be used to generate the SQL queries needed to populate the row structures of a table, or count the number of matching rows.

Update test cases to ensure that deleting a report triggers appropriate cascaded deletes that remove associated bundles and items.

Relates: #19
Closes: #20 #18

Leverage foreign key cascaded delete constraints to ensure that deletion
of reports triggers a cascaded delete of associated bundles, triggering
cascaded deletes of associated bundles.

To support this we need to ensure that SQLite3 foreign_key processing is
enabled when we open the SQLite3 based client data store. Similarly we
want to enable Write Ahead Log (WAL) based journalling mode for our data
store. These options will be automatically included in the SQLite3 data
source specification if not already provided.

Cleanup the TelemetryProcessor and associated TelemetryCommon interface
definitions, leveraging variadic functions to eliminate multiple similar
methods. Similarly for the DatabaseStorer interface. Update associated
implementations to match revised interface definitions and remove any
newly redundant methods.

Implement helper functions that can be used to generate the SQL queries
needed to populate the row structures of a table, or count the number of
matching rows.

Update test cases to ensure that deleting a report triggers appropriate
cascaded deletes that remove associated bundles and items.

Relates: #19
Closes: #20 #18
@rtamalin rtamalin requested a review from mbelur June 13, 2024 17:28
@rtamalin rtamalin self-assigned this Jun 13, 2024
Copy link
Collaborator

@mbelur mbelur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rtamalin rtamalin merged commit dad2f1c into main Jun 13, 2024
1 check passed
@rtamalin rtamalin deleted the submitted_bundles_not_cleaned_up branch July 24, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data Store: cmd/clientds tool should report on all items, bundles and reports in the data store
2 participants