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

feat: Datastore use configurable syncMaxRecords and syncPageSize #388

Merged
merged 1 commit into from
Apr 22, 2020

Conversation

wooj2
Copy link
Contributor

@wooj2 wooj2 commented Apr 14, 2020

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@wooj2 wooj2 requested a review from palpatim April 14, 2020 23:07
@wooj2 wooj2 added the datastore Issues related to the DataStore category label Apr 14, 2020
@wooj2 wooj2 requested a review from jamesonwilliams April 15, 2020 03:21
}

}

private func updateModelSyncMetadata() {
private func updateModelSyncMetadata(lastSyncTime: Int?) {
Copy link
Member

Choose a reason for hiding this comment

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

I'm not seeing that you are using lastSyncTime in this method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On line 182. But hmm.. seems like it's not a good idea to overlap the local function variable lastSyncTime with the instance variable of lastSyncTime.

We were previously always setting the lastSyncTime, which is a bug, because we can have a case where we need to paginate, and when we paginate through a base query, we do not want lastSyncTime to be populated.

But, this has made me think....to make things more clear, it seems like we don't need to keep lastSyncTime as an instance variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to remove instance variable, and will hopefully make things clearer! thanks for the input!

@wooj2 wooj2 force-pushed the feature/datastore-config-configPass-sIntv branch from bf03452 to 02a09e7 Compare April 17, 2020 19:33
@wooj2 wooj2 force-pushed the feature/datastore-config-configPass-sIntv-recCount branch from 1c915b4 to 90b6d5b Compare April 17, 2020 19:49
@wooj2 wooj2 force-pushed the feature/datastore-config-configPass-sIntv branch from 02a09e7 to ea5f132 Compare April 21, 2020 20:32
@wooj2 wooj2 force-pushed the feature/datastore-config-configPass-sIntv-recCount branch from 90b6d5b to ef108d0 Compare April 21, 2020 20:34
Copy link
Member

@palpatim palpatim left a comment

Choose a reason for hiding this comment

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

Consider adding a backlog item for the TODO, otherwise LGTM

@wooj2 wooj2 force-pushed the feature/datastore-config-configPass-sIntv branch 2 times, most recently from 52bd777 to 058da3e Compare April 22, 2020 17:43
@wooj2 wooj2 force-pushed the feature/datastore-config-configPass-sIntv-recCount branch from ef108d0 to 2bec581 Compare April 22, 2020 17:52
@wooj2 wooj2 changed the base branch from feature/datastore-config-configPass-sIntv to master April 22, 2020 17:52
@wooj2 wooj2 changed the title Datastore use configurable syncMaxRecords and syncPageSize feat: Datastore use configurable syncMaxRecords and syncPageSize Apr 22, 2020
@wooj2 wooj2 merged commit ca15e88 into master Apr 22, 2020
@wooj2 wooj2 deleted the feature/datastore-config-configPass-sIntv-recCount branch April 22, 2020 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datastore Issues related to the DataStore category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants