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

fix: event not getting removed from DB and certain processing issue #340

Merged
merged 14 commits into from
Jun 15, 2023

Conversation

1abhishekpandey
Copy link
Contributor

Description

Fix:

  • While SDK updated for the first time from the version containing the issue to the latest version containing the fix:
    • Mark all the previous events whose statuses are 0 and 2 to device_mode_processing_done and remove events whose status code is updated to 3.
    • Any event made after the SDK update will be sent to makeFactoryDump.
    • Also, if the user updates again to any newer version containing this fix, then the SDK will send an event with status codes 0 and 2 to makeFactoryDump instead of directly marking it as device_mode_processing_done.
  • Handle network issues where events are not sent to the device mode integrations and remained stored in the DB. Now, if such a case happens then the event will be sent to device mode factories and when cloud mode processing is done, it’ll be removed from the DB.
  • Handle event not removed from the DB in case of wrong write key while SDK init. Now, if such a case happens then the event will be sent to device mode factories and when cloud mode processing is done, it’ll be removed from the DB.

It is also ensured that there is no issue while:

  • Updating the app from the pre-DMT release to the latest version
  • Updating the app from the post-DMT release to the latest version
  • Reverting back from the latest version to the post-DMT version

Now, the value will be stored into the UserDefault to cover the case where events are made while SDK is init but even before it complete its execution SDK stop e.g., writeKey error.
Sources/Classes/RSPreferenceManager.m Outdated Show resolved Hide resolved
Sources/Classes/RSEventRepository.m Outdated Show resolved Hide resolved
Sources/Classes/RSDBPersistentManager.m Outdated Show resolved Hide resolved
Sources/Classes/RSEventRepository.m Outdated Show resolved Hide resolved
Sources/Classes/RSDeviceModeManager.m Outdated Show resolved Hide resolved
Sources/Classes/RSDeviceModeManager.m Outdated Show resolved Hide resolved
Sources/Classes/Headers/Public/RSDeviceModeManager.h Outdated Show resolved Hide resolved
Sources/Classes/RSDeviceModeManager.m Outdated Show resolved Hide resolved
Sources/Classes/RSDeviceModeManager.m Outdated Show resolved Hide resolved
Sources/Classes/Headers/Public/RSDBPersistentManager.h Outdated Show resolved Hide resolved
Sources/Classes/RSUtils.m Show resolved Hide resolved
Sources/Classes/RSDeviceModeManager.m Outdated Show resolved Hide resolved
desusai7
desusai7 previously approved these changes Jun 14, 2023
pallabmaiti
pallabmaiti previously approved these changes Jun 14, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jun 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@1abhishekpandey 1abhishekpandey merged commit 54d210c into develop Jun 15, 2023
1abhishekpandey added a commit that referenced this pull request Jul 31, 2023
* chore: added credit to NSData+GZIP (#341)

* fix: event not getting removed from DB and certain processing issue (#340)

* fix: event not getting removed  from DB and certain processing issue

* fix: application update event logic

* refactor: the firstEventTimestampBeforeSDKInit() logic

Now, the value will be stored into the UserDefault to cover the case where events are made while SDK is init but even before it complete its execution SDK stop e.g., writeKey error.

* chore: address Sonarcloud bug and code smell issue

* chore: addressing comments

Refactored most of the logic.

* chore: remove leftover codes

* chore: refactor RSEventDeletionStatus key in preference manager

* refactor: device mode events processing logic

* fix: improve the logic of isDeviceModeFactoriesNotPresent property

* chore: addressing comments

* code refactored

* fix: use correct variable name for rowId

---------

Co-authored-by: Pallab Maiti <[email protected]>

* fix: replay message queue dumping logic  (#348)

* fix: replay message queue dumping logic

* revert: previous logic to mark events as device mode processing done on App Update

* test: add new db unit test case and fix old one

* fix: fixed application installed and updated getting triggered in-correctly (#345)

Co-authored-by: Desu Sai Venkat <[email protected]>
Co-authored-by: Abhishek Pandey <[email protected]>

* fix: fixed automatic session not getting cleared on dynamically disabling track life cycle events (#344)

Co-authored-by: Desu Sai Venkat <[email protected]>
Co-authored-by: Abhishek Pandey <[email protected]>

* chore(release): 1.16.1

---------

Co-authored-by: Pallab Maiti <[email protected]>
Co-authored-by: Abhishek Pandey <[email protected]>
Co-authored-by: Pallab Maiti <[email protected]>
Co-authored-by: Desu Sai Venkat <[email protected]>
Co-authored-by: Desu Sai Venkat <[email protected]>
Co-authored-by: GitHub actions <[email protected]>
@1abhishekpandey 1abhishekpandey deleted the fix/eventProcessingIssue branch August 1, 2023 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants