Skip to content

allow for link-based session locks on desktop - #5668

Merged
kevinushey merged 5 commits into
masterfrom
feature/desktop-linkbased-locks
Nov 6, 2019
Merged

kevinushey merged 5 commits into
masterfrom
feature/desktop-linkbased-locks

Conversation

@kevinushey

Copy link
Copy Markdown
Collaborator

Closes #3521.

Comment thread src/cpp/core/file_lock/FileLock.cpp Outdated

// default values for static members
FileLock::LockType FileLock::s_defaultType(FileLock::LOCKTYPE_LINKBASED);
FileLock::LockType FileLock::s_defaultType(kLockTypeDefaultEnum);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If I'm reading this correctly, it not only makes link based locks possible, it also switches to link based locks by default on MacOS and Linux desktops. Is that intentional? (IIRC we don't have known issues with advisory locks there)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That's a good point -- we don't want to change the default here; just make it possible to respect the user-set lock for session locks. I'll fix this.

@kevinushey
kevinushey force-pushed the feature/desktop-linkbased-locks branch from d293581 to 648acec Compare November 5, 2019 17:49
@kevinushey

Copy link
Copy Markdown
Collaborator Author

Okay, PR now only makes the small change of allowing desktop to use the "default" lock type, meaning the link-based locks on Ubuntu + macOS desktop. (Windows will still use advisory locks by default.)

@jmcphers

jmcphers commented Nov 5, 2019

Copy link
Copy Markdown
Member

Won't that still change the lock type default on those operating systems?

FileLock::LockType FileLock::s_defaultType(FileLock::LOCKTYPE_LINKBASED);

@kevinushey

Copy link
Copy Markdown
Collaborator Author

Sorry about that! I think I've got the right implementation wired in now.

@jmcphers

jmcphers commented Nov 6, 2019

Copy link
Copy Markdown
Member

LGTM!

@kevinushey
kevinushey merged commit e73fa2b into master Nov 6, 2019
@valerie-rstudio
valerie-rstudio deleted the feature/desktop-linkbased-locks branch January 21, 2022 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot save file after New Session, file on network drive

2 participants