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

fix(dump): Uncompress the dump IN the data.ms #2057

Merged
merged 1 commit into from
Jan 10, 2022
Merged

Conversation

irevoire
Copy link
Member

@irevoire irevoire commented Jan 5, 2022

When loading a dump with docker, we had two problems.
After creating a tempdirectory, uncompressing and re-indexing the dump:

  1. We try to move the new “data.ms” onto the currently present
    one. The problem is that if the data.ms is a mount point because
    that's what peoples do with docker usually. We can't override
    a mount point, and thus we were throwing an error.
  2. The tempdir is created in /tmp, which is usually quite small AND may not
    be on the same partition as the data.ms. This means when we tried to move
    the dump over the data.ms, it was also failing because we can't move data
    between two partitions.

1 was fixed by deleting the content of the data.ms and moving the content
of the tempdir inside the data.ms. If someone tries to create volumes inside
the data.ms that's his problem, not ours.
2 was fixed by creating the tempdir inside of the data.ms. If a user mounted
its data.ms on a large partition, there is no reason he could not load a big
dump because his /tmp was too small. This solves the issue; now the dump is
extracted and indexed on the same partition the data.ms will lay.

fix #1833

When loading a dump with docker, we had two problems.
After creating a tempdirectory, uncompressing and re-indexing the dump:
1. We try to `move` the new “data.ms” onto the currently present
   one. The problem is that if the `data.ms` is a mount point because
   that's what peoples do with docker usually. We can't override
   a mount point, and thus we were throwing an error.
2. The tempdir is created in `/tmp`, which is usually quite small AND may not
   be on the same partition as the `data.ms`. This means when we tried to move
   the dump over the `data.ms`, it was also failing because we can't move data
   between two partitions.
==============
1 was fixed by deleting the *content* of the `data.ms` and moving the *content*
of the tempdir *inside* the `data.ms`. If someone tries to create volumes inside
the `data.ms` that's his problem, not ours.
2 was fixed by creating the tempdir *inside* of the `data.ms`. If a user mounted
its `data.ms` on a large partition, there is no reason he could not load a big
dump because his `/tmp` was too small. This solves the issue; now the dump is
extracted and indexed on the same partition the `data.ms` will lay.

fix #1833
@irevoire irevoire changed the base branch from release-v0.25.0 to main January 10, 2022 13:56
@irevoire irevoire changed the title Fix docker dump import fix(dump): Uncompress the dump IN the data.ms Jan 10, 2022
@irevoire irevoire added this to the v0.26.0 milestone Jan 10, 2022
@irevoire irevoire added the bug Something isn't working as expected label Jan 10, 2022
@irevoire
Copy link
Member Author

bors merge

@bors
Copy link
Contributor

bors bot commented Jan 10, 2022

@bors bors bot merged commit 1818026 into main Jan 10, 2022
@bors bors bot deleted the fix-docker-dump-import branch January 10, 2022 18:11
@curquiza curquiza added the v0.26.0 PRs/issues solved in v0.26.0 label Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected v0.26.0 PRs/issues solved in v0.26.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import dumps in docker instance got os error 16
3 participants