Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Transactional' package extraction #8

Open
maraf opened this issue May 30, 2019 · 4 comments
Open

'Transactional' package extraction #8

maraf opened this issue May 30, 2019 · 4 comments
Labels
area: package manager type: discussion Something needs to be clarified type: feature New feature or request
Milestone

Comments

@maraf
Copy link
Member

maraf commented May 30, 2019

Package extraction include write to packages.config should succeed as an unit or any partial outputs should be deleted in case of exception.

Toughts:
Use kind of a transaction log.

Installation

  • Save package id and version.
  • After each file extraction, save a path to log.
  • Write entry to packages.config and delete transaction log.

Unstallation

  • Save package id and temp directory patb.
  • Copy each file to temp directory.
  • Remove entry from packages.config.
  • Delete temp directory.

Check transaction log on PackageManager start.

@maraf maraf added type: feature New feature or request area: package manager labels May 30, 2019
@mast-eu
Copy link
Member

mast-eu commented May 30, 2019

Could you please provide more context? How many write accesses are performed to packages.config?
How much of a risk do you see to end up with an inconsistent packages.config?

@mast-eu mast-eu added the type: discussion Something needs to be clarified label May 30, 2019
@maraf
Copy link
Member Author

maraf commented May 31, 2019

Every installation and update do two things

  • write to packages.config,
  • extract content from package. Most packages right now contain only one file, but packages like PM contains more files.

There is always chance that something goes wrong. Now we have no way to check.
The worst scenario is GE will be crashing all over again, because some dll in user plugins will be missing,.

@mast-eu
Copy link
Member

mast-eu commented May 31, 2019

There is always chance that something goes wrong. Now we have no way to check.

You're right, many things can go wrong when dealing with I/O. However, I'm strongly inclined to take the risk for v.1.0.0.
In the worst case, a few users will have to manually delete their UserPlugins directories (except PluginManager, of course 😏 ) and install their plugins again.

Do you agree?

@maraf
Copy link
Member Author

maraf commented May 31, 2019

Absolutely.

@mast-eu mast-eu added this to the Backlog milestone May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: package manager type: discussion Something needs to be clarified type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants