Skip to content

[8.2] add locks in the scanner to prevent multiple scanners running on the … - #24260

Merged
MorrisJobke merged 1 commit into
stable8.2from
scanner-locking-82
Apr 26, 2016
Merged

MorrisJobke merged 1 commit into
stable8.2from
scanner-locking-82

Conversation

@icewind1991

Copy link
Copy Markdown
Contributor

…same files

Backport of #24205 to stable 8.2

@icewind1991 icewind1991 added this to the 8.2.4-current-maintenance milestone Apr 25, 2016
@mention-bot

Copy link
Copy Markdown

By analyzing the blame information on this pull request, we identified @PVince81, @butonic and @ringmaster to be potential reviewers

@icewind1991 icewind1991 changed the title add locks in the scanner to prevent multiple scanners running on the … [8.2] add locks in the scanner to prevent multiple scanners running on the … Apr 25, 2016
@PVince81

Copy link
Copy Markdown
Contributor

@icewind1991 just tried reproducing the original issue and I'm getting a different behavior on v8.2.3 without this fix.

It seems that a "mv" operation never rescans the folder's contents, while a "ls" does. So even with the sleep(1);, the "mv" will finish quickly.

While "ls" is running the rescan, a "mv" will properly be locked out.

So not sure, maybe the scanner workflow was different in v8.2.3 and since OC 9 we scan in more situations ? I hope this is intended and not an unintended side effect. @icewind1991 can you confirm ?

@PVince81

Copy link
Copy Markdown
Contributor

It does make sense for OC to first rescan a folder's contents before renaming it, so I'd say OC 9 is right and OC 8 was wrong.

@PVince81

Copy link
Copy Markdown
Contributor

Even stranger: when I start first a "mv test test2" and directly after that I do "ls test", the "ls" wins and "mv" fails with 423 Locked.

@PVince81

PVince81 commented Apr 26, 2016 •

Copy link
Copy Markdown
Contributor

I just tested two concurrent "ls" on the same to-be-rescanned folder. (like #20555 (comment) but with two "ls" operations)

Before this fix: both hang and take time, one times out with "Deadlock" error.
After this fix: one hangs and takes time, the other one returns the old results

👍 since this does fixes an issue let's move forward with it.

@MorrisJobke

Copy link
Copy Markdown
Contributor

Tested and works 👍

@MorrisJobke
MorrisJobke merged commit 9828ae4 into stable8.2 Apr 26, 2016
@MorrisJobke
MorrisJobke deleted the scanner-locking-82 branch April 26, 2016 08:57
@PVince81

Copy link
Copy Markdown
Contributor

Regression in occ files:scan with single file shares: #24507

@lock

lock Bot commented Aug 5, 2019

Copy link
Copy Markdown

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants