Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Issue 2564343002: Mark duplicate files even when scan result found no new files. (Closed)

Created:
4 years ago by yamaguchi
Modified:
3 years, 11 months ago
Reviewers:
fukino, Steve McKay
CC:
chromium-reviews, tfarina, yamaguchi+watch_chromium.org, oka+watch_chromium.org, rginda+watch_chromium.org, mtomasz+watch_chromium.org, fukino+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mark duplicate files even when scan result found no new files. Downside of this change is that it'll rerun the latest scan after marking the duplicate files. Though, the second scan is faster than the first one as it'll not find any new files, thus can skip de-duplication by content hashes. It may increase the scan time especially when having large number of files in a media and doing the "manual copy to Drive" operation like noted in the bug comment. https://bugs.chromium.org/p/chromium/issues/detail?id=476684#c16 BUG=476684 TEST=manual test as noted in the bug. Confirm content-duplicate files marked as backed up after scan. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/8336e28a7e8d7c64cb8c96912d874eb0483b2668 Cr-Commit-Position: refs/heads/master@{#439444}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Avoid recursive call to checkState_. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -5 lines) Patch
M ui/file_manager/file_manager/foreground/js/import_controller.js View 1 3 chunks +23 lines, -5 lines 2 comments Download

Messages

Total messages: 26 (17 generated)
yamaguchi
PTAL.
4 years ago (2016-12-15 14:02:58 UTC) #13
yamaguchi
https://codereview.chromium.org/2564343002/diff/1/ui/file_manager/file_manager/foreground/js/import_controller.js File ui/file_manager/file_manager/foreground/js/import_controller.js (right): https://codereview.chromium.org/2564343002/diff/1/ui/file_manager/file_manager/foreground/js/import_controller.js#newcode385 ui/file_manager/file_manager/foreground/js/import_controller.js:385: this.execute_(); As discussed offline, I will revise this to ...
4 years ago (2016-12-19 03:30:33 UTC) #14
yamaguchi
ptal https://codereview.chromium.org/2564343002/diff/1/ui/file_manager/file_manager/foreground/js/import_controller.js File ui/file_manager/file_manager/foreground/js/import_controller.js (right): https://codereview.chromium.org/2564343002/diff/1/ui/file_manager/file_manager/foreground/js/import_controller.js#newcode287 ui/file_manager/file_manager/foreground/js/import_controller.js:287: * by calling "update" on this class. Note: ...
4 years ago (2016-12-19 06:19:50 UTC) #15
fukino
lgtm
4 years ago (2016-12-19 07:33:27 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2564343002/20001
4 years ago (2016-12-19 08:59:55 UTC) #18
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-19 09:51:53 UTC) #21
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/8336e28a7e8d7c64cb8c96912d874eb0483b2668 Cr-Commit-Position: refs/heads/master@{#439444}
4 years ago (2016-12-19 09:54:05 UTC) #23
Steve McKay
https://codereview.chromium.org/2564343002/diff/20001/ui/file_manager/file_manager/foreground/js/import_controller.js File ui/file_manager/file_manager/foreground/js/import_controller.js (right): https://codereview.chromium.org/2564343002/diff/20001/ui/file_manager/file_manager/foreground/js/import_controller.js#newcode395 ui/file_manager/file_manager/foreground/js/import_controller.js:395: this.startImportTask_(); Seems like this might result in some false ...
3 years, 12 months ago (2016-12-27 17:10:58 UTC) #25
yamaguchi
3 years, 11 months ago (2017-01-05 11:50:05 UTC) #26
Message was sent while issue was closed.
https://codereview.chromium.org/2564343002/diff/20001/ui/file_manager/file_ma...
File ui/file_manager/file_manager/foreground/js/import_controller.js (right):

https://codereview.chromium.org/2564343002/diff/20001/ui/file_manager/file_ma...
ui/file_manager/file_manager/foreground/js/import_controller.js:395:
this.startImportTask_();
On 2016/12/27 17:10:58, Steve McKay wrote:
> Seems like this might result in some false reports of imports. Can we break up
> startImportTask_ to avoid this?

I agree. I found it's importer.MediaImportHandler.ImportTask that sends reports
to the tracker.
Therefore I think a possible fix would be to stop reusing ImportTask but
establish a different type of Task (e.g.
importer.MediaImportHandler.MarkDuplicatesTask) sharing part of the code.

https://cs.chromium.org/chromium/src/ui/file_manager/file_manager/background/...

Having said that, this code path will no longer be used after the change to skip
content-duplicate check at the scan phase. It's because history-duplicate is not
included in the getDuplicateFileEntrie().
https://cs.chromium.org/chromium/src/ui/file_manager/file_manager/background/...

I think we need to cleanup code around this.

> 
> Also, it looks like startImportTask_ will ultimately call onImportFinished_
> which itself calls checkState_ again. So there appears to be risk of an
infinite
> loop.

Thanks for finding it out.
I agree that we should have a separate code path to avoid such risk.

Powered by Google App Engine
This is Rietveld 408576698