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

[Feature] updating code to work for retries if the save table fails #61

Merged
merged 3 commits into from
Dec 7, 2023

Conversation

asingamaneni
Copy link
Collaborator

Description

Making code changes so as to support retries for writing into table if it fails. Update table properties only if the property is not already written.

Related Issue

#60

Motivation and Context

When there are multiple processes writing at the same time into the stats table, having issues with concurrent writes. Adding retries and also write table properties only when not written.

How Has This Been Tested?

The code has been unit tested

Screenshots (if appropriate):

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

codecov bot commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5e6c601) 100.00% compared to head (f4e5876) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #61   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           22        22           
  Lines         1441      1447    +6     
=========================================
+ Hits          1441      1447    +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Umeshsp22
Copy link
Collaborator

LGTM

Umeshsp22
Umeshsp22 approved these changes Dec 7, 2023
@phanikumarvemuri
Copy link
Contributor

phanikumarvemuri commented Dec 7, 2023

I see we are retrying the write irrespective of exception caused. Should we not retry only when it failed for concurrent writes ?
Also as per delta Lake doc multiple Inserts should not conflict. Can you please share the exception details ( the stack trace ) ?

@asingamaneni asingamaneni merged commit 1c87e21 into main Dec 7, 2023
6 checks passed
@asingamaneni asingamaneni deleted the feature-stats-concurrent-writes branch December 7, 2023 20:29
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.

4 participants