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

Pass last_fetch_time to fetch-sync-records #4231

Closed
wants to merge 4 commits into from

Conversation

AlexeyBarabash
Copy link
Contributor

@AlexeyBarabash AlexeyBarabash commented Dec 13, 2019

Fixes brave/brave-browser#7327

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Verified that these changes build without errors on
    • Android
    • iOS
    • Linux
    • macOS
    • Windows
  • Verified that these changes pass automated tests (unit, browser, security tests) on
    • iOS
    • Linux
    • macOS
    • Windows
1 test timed out:
    BraveRewardsBrowserTest.ProcessPendingContributions (../../brave/components/brave_rewards/browser/rewards_service_browsertest.cc:2763)

Test Plan:

See STR of Option I. and option II. at brave/brave-browser#7327

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

Copy link
Member

@darkdh darkdh left a comment

Choose a reason for hiding this comment

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

please rebase and squash commits Point to sync-staging server and Updated DEPS of brave sync lib (points to staging)

@AlexeyBarabash AlexeyBarabash force-pushed the poll_sqs_issue_7327 branch 2 times, most recently from 2e7c9ef to 131fda0 Compare January 9, 2020 15:13
@AlexeyBarabash
Copy link
Contributor Author

got CI [ 1.5.21 != 1.5.18 ] 17:14:56 + echo Version mismatch between brave-browser and brave-core in package.json, please try rebasing this branch in brave-core as well 17:14:56 Version mismatch between brave-browser and brave-core in package.json, please try rebasing this branch in brave-core as well

Rebased.

@AlexeyBarabash
Copy link
Contributor Author

Restarted CI due to
Error: Command 'vpython src/brave/script/download_rust_deps.py' returned non-zero exit status 1 in /Users/jenkins/jenkins/workspace/ser-build-pr_poll_sqs_issue_7327

@AlexeyBarabash
Copy link
Contributor Author

AlexeyBarabash commented Jan 10, 2020

CI failed due to

17:06:01  [408/427] STAMP obj/chrome/installer/mini_installer/setup_runtime_deps.stamp
17:06:40  Cannot contact i-0132f19b7b8f8e9bb: hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@3c317da6:i-0132f19b7b8f8e9bb": Remote call on i-0132f19b7b8f8e9bb failed. The channel is closing down or has closed down
17:11:40  Could not connect to i-0132f19b7b8f8e9bb to send interrupt signal to process

restarted

@AlexeyBarabash
Copy link
Contributor Author

Tested PR with STR 2, wait 24hrs to force fetch over S3.
Saw a situation when fetch-sync-records failed, so get-existing-object wasn't called, but SetLastPreferencesFetchTime set the fetch time.
This broke the logic, as 1st fetch after 24hrs intended to be from S3 has been skipped, and the next fetch goes through SQS, so records can be missed.

PR needs to be updated. Going to expand get-existing-object callback to return the time fetch-sync-records of corresponding operation. And do update of the last_fetch_time when the operation actually succeeded.

Details log

[25015:25015:0114/143959.049684:ERROR:brave_profile_sync_service_impl.cc(1003)] [BraveSync] FetchDevices last_fetch_time=2020-01-12 12:56:23.536 UTC
[25015:25015:0114/143959.049795:ERROR:brave_profile_sync_service_impl.cc(1005)] [BraveSync] FetchDevices did SetLastPreferencesFetchTime =2020-01-14 12:39:59.049 UTC
[25015:25015:0114/143959.049812:ERROR:brave_profile_sync_service_impl.cc(1011)] [BraveSync] FetchDevices before call SendFetchSyncRecords({kPreferences})
[25015:25015:0114/143959.049827:ERROR:brave_profile_sync_service_impl.cc(1015)] [BraveSync] FetchDevices after call SendFetchSyncRecords({kPreferences})
[25015:25053:0114/143959.126934:ERROR:rewards_service_impl.cc(206)] Failed to read file: /home/alexey/.config/BraveSoftware/TEST/A/Default/ledger_state
[25052:25052:0114/143959.127592:ERROR:ledger_impl.cc(102)] Failed to initialize wallet
[25042:25042:0114/143959.186438:ERROR:sandbox_linux.cc(372)] InitializeSandbox() called with multiple threads in process gpu-process.
[25015:25015:0114/143959.265520:ERROR:brave_profile_sync_service_impl.cc(1003)] [BraveSync] FetchDevices last_fetch_time=2020-01-14 12:39:59.049 UTC
[25015:25015:0114/143959.265580:ERROR:brave_profile_sync_service_impl.cc(1005)] [BraveSync] FetchDevices did SetLastPreferencesFetchTime =2020-01-14 12:39:59.265 UTC
[25015:25015:0114/143959.265602:ERROR:brave_profile_sync_service_impl.cc(1011)] [BraveSync] FetchDevices before call SendFetchSyncRecords({kPreferences})
[25015:25015:0114/143959.265683:ERROR:brave_profile_sync_service_impl.cc(1015)] [BraveSync] FetchDevices after call SendFetchSyncRecords({kPreferences})
[25015:25015:0114/143959.379232:ERROR:brave_profile_sync_service_impl.cc(1003)] [BraveSync] FetchDevices last_fetch_time=2020-01-14 12:39:59.265 UTC
[25015:25015:0114/143959.379377:ERROR:brave_profile_sync_service_impl.cc(1005)] [BraveSync] FetchDevices did SetLastPreferencesFetchTime =2020-01-14 12:39:59.379 UTC
[25015:25015:0114/143959.379438:ERROR:brave_profile_sync_service_impl.cc(1011)] [BraveSync] FetchDevices before call SendFetchSyncRecords({kPreferences})
[25015:25015:0114/143959.379582:ERROR:brave_profile_sync_service_impl.cc(1015)] [BraveSync] FetchDevices after call SendFetchSyncRecords({kPreferences})
[25015:25015:0114/143959.602635:ERROR:CONSOLE(0)] "Error in event handler: TypeError: callbackList.fetch-sync-records is not a function
    at chrome-extension://nomlkjnggnifocmealianaaiobmebgil/extension/background.js:13:37", source: chrome-extension://nomlkjnggnifocmealianaaiobmebgil/_generated_background_page.html (0)
[25015:25015:0114/143959.603053:ERROR:CONSOLE(0)] "Error in event handler: TypeError: callbackList.fetch-sync-records is not a function
    at chrome-extension://nomlkjnggnifocmealianaaiobmebgil/extension/background.js:13:37", source: chrome-extension://nomlkjnggnifocmealianaaiobmebgil/_generated_background_page.html (0)
[25015:25015:0114/144002.152509:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: Cannot access contents of url "chrome://bookmarks/". Extension manifest must request permission to access this host.", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/_generated_background_page.html (0)
[25015:25015:0114/144002.168238:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: Cannot access contents of url "chrome://sync/". Extension manifest must request permission to access this host.", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/_generated_background_page.html (0)
[25015:25015:0114/144035.362490:ERROR:http_bridge.cc(106)] Not implemented reached in virtual void syncer::HttpBridgeFactory::OnSignalReceived()
[25015:25040:0114/144035.398052:ERROR:process_posix.cc(333)] Unable to terminate process 25047: No such process (3)

@AlexeyBarabash
Copy link
Contributor Author

Closing, will not be actual with sync v2

@AlexeyBarabash AlexeyBarabash deleted the poll_sqs_issue_7327 branch February 3, 2021 20:26
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.

Sync polls S3 twice a minute when there are no activity for 24 hours
2 participants