New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 840211 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 649911



Sign in to add a comment

ChromeOS drive engine should use page tokens rather than changeStampId to detected changes

Project Member Reported by slangley@chromium.org, May 7 2018

Issue description

Currently change list loading/processing uses the largestChangeId, which is deprecated in drive API and is not supported by team drives.

We should move everything across to start page token so we have a consistent approach.
 
Blocking: 649911
s/changeStampId/largestChangeId/
Project Member

Comment 3 by bugdroid1@chromium.org, May 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/65234c47ec92199c95384d4e515129a2e86e6169

commit 65234c47ec92199c95384d4e515129a2e86e6169
Author: Stuart Langley <slangley@chromium.org>
Date: Wed May 09 10:30:24 2018

ResourceMetadata for supporting StartPageToken in the header and directories.

This cl adds start_page_token to ResourceMetadataHeader and
DirectorySpecificInfo for supporting change list retrival based on
startPageToken instead of largestChangeId.

Bug:  840211 
Change-Id: Ib498276b48b28dc1876fc9a70a4a1356b60ddeb9
Reviewed-on: https://chromium-review.googlesource.com/1050052
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>
Commit-Queue: Stuart Langley <slangley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557137}
[modify] https://crrev.com/65234c47ec92199c95384d4e515129a2e86e6169/components/drive/chromeos/resource_metadata.cc
[modify] https://crrev.com/65234c47ec92199c95384d4e515129a2e86e6169/components/drive/chromeos/resource_metadata.h
[modify] https://crrev.com/65234c47ec92199c95384d4e515129a2e86e6169/components/drive/drive.proto
[modify] https://crrev.com/65234c47ec92199c95384d4e515129a2e86e6169/components/drive/resource_metadata_storage.cc
[modify] https://crrev.com/65234c47ec92199c95384d4e515129a2e86e6169/components/drive/resource_metadata_storage.h
[modify] https://crrev.com/65234c47ec92199c95384d4e515129a2e86e6169/components/drive/resource_metadata_unittest.cc

Project Member

Comment 4 by bugdroid1@chromium.org, May 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8e3f68204c32185cfbe1bfa95e9c2871b9e31e0e

commit 8e3f68204c32185cfbe1bfa95e9c2871b9e31e0e
Author: Stuart Langley <slangley@chromium.org>
Date: Wed May 09 11:18:18 2018

Provide ResourceMetadataStorage upgrade path from V15 to V16.

This updated takes any stored changestamps for directories and for the
ResourceMetadataHeader and convers them to startPageTokens, which essentially
just adds 1 to the current value and writes it out as a string.

Bug:  840211 
Change-Id: I0e5d736daae632a85d55fa549bae3ffdf81f0584
Reviewed-on: https://chromium-review.googlesource.com/1051213
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>
Commit-Queue: Stuart Langley <slangley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557146}
[modify] https://crrev.com/8e3f68204c32185cfbe1bfa95e9c2871b9e31e0e/components/drive/file_system_core_util.cc
[modify] https://crrev.com/8e3f68204c32185cfbe1bfa95e9c2871b9e31e0e/components/drive/file_system_core_util.h
[modify] https://crrev.com/8e3f68204c32185cfbe1bfa95e9c2871b9e31e0e/components/drive/resource_metadata_storage.cc
[modify] https://crrev.com/8e3f68204c32185cfbe1bfa95e9c2871b9e31e0e/components/drive/resource_metadata_storage.h
[modify] https://crrev.com/8e3f68204c32185cfbe1bfa95e9c2871b9e31e0e/components/drive/resource_metadata_storage_unittest.cc

Project Member

Comment 5 by bugdroid1@chromium.org, May 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c92ed252174bc9b9ece9d11a83852f4ab8765575

commit c92ed252174bc9b9ece9d11a83852f4ab8765575
Author: Stuart Langley <slangley@chromium.org>
Date: Wed May 16 08:38:34 2018

Use startPageToken to retrieve change lists, instead of largestChangeId.

This change enables the detection of new changes to the users drive and
retrieval of these changes by using a startPageToken rather than the
largestChangeId, which has been deprecated.

We need to make this change to support retriving change lists for Team Drives,
which do not support largestChangeId at all.

The key changes are:
- Factor our passing AboutResource to various change list loader callbacks,
  and remember the root_folder_id so we do not need to continually poll
  GetAboutResource.
- Do not pass AboutResource to ChangeListProcessor anymore, just flow the root
  folder id.
- Remove ChangeListProcessor::ApplyTeamDriveChangeList, it was only used from
  test code and relied on largestChangeId which will not work with production
  drive.
- Fix all tests to use start_page_token and not largest change id.

Followup Work:
- Remove (Get|Set)LargestChangestamp from resource metadata.
- Pass in root_folder_id to change list loader and directory loader so they do
  not need AboutResource anymore, then they can be used to load from team drives
  as well as the default corpus.

Bug:  840211 
Change-Id: I49784cd55632dac4bc61c1a912a7f6fe4e1caaa4
Reviewed-on: https://chromium-review.googlesource.com/1048925
Commit-Queue: Stuart Langley <slangley@chromium.org>
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559015}
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/change_list_loader_unittest.cc
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/change_list_processor_unittest.cc
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/chromeos/change_list_loader.cc
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/chromeos/change_list_loader.h
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/chromeos/change_list_processor.cc
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/chromeos/change_list_processor.h
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/chromeos/directory_loader.cc
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/chromeos/directory_loader.h
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/chromeos/file_system.cc
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/chromeos/file_system.h
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/directory_loader_unittest.cc
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/drive.proto
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/file_system/operation_test_base.cc
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/file_system/operation_test_base.h
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/file_system_core_util.cc
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/file_system_core_util.h
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/file_system_unittest.cc
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/service/fake_drive_service.cc
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/service/fake_drive_service_unittest.cc
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/sync/entry_update_performer_unittest.cc
[modify] https://crrev.com/c92ed252174bc9b9ece9d11a83852f4ab8765575/components/drive/sync_client_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment