Skip to content

Use separate state files for desktop and server - #6744

Merged
jmcphers merged 1 commit into
masterfrom
bugfix/server-desktop-sourcedb
Apr 27, 2020
Merged

jmcphers merged 1 commit into
masterfrom
bugfix/server-desktop-sourcedb

Conversation

@jmcphers

Copy link
Copy Markdown
Member

We currently store RStudio's per-user state in ~/.local/share/rstudio/rstudio-state.json. This means that both desktop and server share per-user state, which can cause conflicts when RStudio Desktop and RStudio Server are both used with the same account.

The fix is to store them in separate files in the same folder (rstudio-desktop.json and rstudio-server.json). This causes them to use different context IDs, which in turn gives them different source databases.

Fixes #6742.

@jmcphers jmcphers added this to the v1.3 milestone Apr 27, 2020
@jmcphers
jmcphers requested a review from kevinushey April 27, 2020 16:28

@gtritchie gtritchie left a comment

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.

LGTM!

@jmcphers
jmcphers merged commit a78f3fb into master Apr 27, 2020
#define SESSION_USER_STATE_HPP

#define kUserStateFile "rstudio-state.json"
#define kUserStateFileDesktop "rstudio-desktop.json"

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.

Does this change require a migration from existing users of v1.3 that already have rstudio-state.json ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Unfortunately it does. I've done that as a follow up change here: 10a6846

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.

Okay great!

@valerie-rstudio
valerie-rstudio deleted the bugfix/server-desktop-sourcedb branch January 21, 2022 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop and server share a source database

3 participants