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

refactor: catch OutOfMemoryError in RudderCloudModeManager #487

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

vgupta98
Copy link
Contributor

@vgupta98 vgupta98 commented Dec 6, 2024

Description

  • This PR resolves the fatal error caused by OutOfMemoryError in RudderCloudModeManager.

Implementation details

  • The error actually occurs in DBPersistentManager in getDBRecordCount method. This method is called in maintainDBThreshold method which is in turn called in a thread in startCloudModeProcessor.
  • The error is unrelated to any database operations and occurs at OS level, therefore this PR catches the error and logs a message in startCloudModeProcessor in RudderCloudModeManager.
  • During the catching of the error, a Thread.sleep is added to prevent the while loop from running constantly in case the exception is thrown again.

Type of change

  • 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 not work as expected)
  • This change requires a documentation update

Checklist:

  • Version upgraded (project, README, gradle, podspec etc)
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added unit tests for the code
  • I have made corresponding changes to the documentation

@vgupta98 vgupta98 marked this pull request as ready for review December 6, 2024 09:07
@vgupta98 vgupta98 requested a review from a team as a code owner December 6, 2024 09:07
@vgupta98 vgupta98 requested review from ChryssaAliferi and 1abhishekpandey and removed request for a team December 6, 2024 09:07
@vgupta98 vgupta98 self-assigned this Dec 6, 2024
@vgupta98 vgupta98 requested review from a team and removed request for a team December 6, 2024 09:08
1abhishekpandey
1abhishekpandey previously approved these changes Dec 6, 2024
@vgupta98 vgupta98 force-pushed the refactor/sdk-2733-handle-outofmemory-error branch from 3e625ca to b8f9b1b Compare December 6, 2024 11:26
Copy link

sonarqubecloud bot commented Dec 6, 2024

@vgupta98 vgupta98 merged commit 0b3759e into develop Dec 9, 2024
11 checks passed
@vgupta98 vgupta98 deleted the refactor/sdk-2733-handle-outofmemory-error branch December 9, 2024 03:49
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.

3 participants