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

FETCH_SYNC_RECORDS can limit response to 1000 records #69

Merged
merged 2 commits into from Apr 6, 2017

Conversation

@ayumi
Copy link
Contributor

ayumi commented Apr 5, 2017

Fix #68

browser/lib API changes:

  • FETCH_SYNC_RECORDS
    • New param: limitResponse (boolean). when set to true, limits response to 1000 (previously unbounded)
    • New response param: lastRecordTimestamp (number), the timestamp in milliseconds of the last record in a response batch. Useful as a cursor for traversing batches of 1000.
    • Changes should be non-breaking and compatible with existing browser Sync implementations.

Test plan:

  1. brave/sync tests should pass
  2. yarn dist into browser-laptop
  3. browser-laptop sync tests should pass (yarn test -- --grep='"^Syncing"')
.list() returns raw S3 objects now
@ayumi ayumi requested a review from diracdeltas Apr 5, 2017
@@ -80,20 +76,22 @@ const maybeSetDeviceId = (requester) => {
* @param {RequestUtil} requester
*/
const startSync = (requester) => {
ipc.on(messages.FETCH_SYNC_RECORDS, (e, categoryNames, startAt) => {
ipc.on(messages.FETCH_SYNC_RECORDS, (e, categoryNames, startAt, limitResponse) => {

This comment has been minimized.

Copy link
@diracdeltas

diracdeltas Apr 5, 2017

Member

plz add limitResponse to client/constants/messages.js

This comment has been minimized.

Copy link
@ayumi

ayumi Apr 5, 2017

Author Contributor

okay

@ayumi ayumi force-pushed the feature/fetch-records-with-limit branch from 9297ea3 to 349592a Apr 5, 2017
@ayumi ayumi merged commit 88a35e8 into staging Apr 6, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@ayumi ayumi deleted the feature/fetch-records-with-limit branch Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.