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

v0.24.0 Space Migration doesn't work with custom data directory #1773

Closed
jameskerr opened this issue Aug 17, 2021 · 2 comments · Fixed by brimdata/brimcap#133
Closed

v0.24.0 Space Migration doesn't work with custom data directory #1773

jameskerr opened this issue Aug 17, 2021 · 2 comments · Fixed by brimdata/brimcap#133
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jameskerr
Copy link
Member

To reproduce, open version 24, change the data directory in the preferences, import a file, then checkout the main branch and start the app. You'll see these error messages.

Screen Shot 2021-08-17 at 10 24 24 AM

And in the console:
Screen Shot 2021-08-17 at 9 13 17 AM

Is it possible to migrate the data when some spaces are in one data directory, while others are elsewhere? I did an experiment where one space was in the default data dir while another space was in a custom data dir. The first space got migrated to a pool, while the second one threw the error above.

@jameskerr jameskerr added the bug Something isn't working label Aug 17, 2021
@philrz philrz added this to the Data MVP0 milestone Aug 18, 2021
mattnibs added a commit to brimdata/brimcap that referenced this issue Aug 19, 2021
Since its possible that the data location for a space is not
zqdroot/sp_<space_id>, use SpaceRow.DataURI.

Closes brimdata/zui#1773
mattnibs added a commit to brimdata/brimcap that referenced this issue Aug 19, 2021
Since its possible that the data location for a space is not
zqdroot/sp_<space_id>, use SpaceRow.DataURI.

Closes brimdata/zui#1773
mattnibs added a commit to brimdata/brimcap that referenced this issue Aug 20, 2021
Since its possible that the data location for a space is not
zqdroot/sp_<space_id>, use SpaceRow.DataURI.

Closes brimdata/zui#1773
@philrz
Copy link
Contributor

philrz commented Aug 23, 2021

In preparation to verify the fix, here's a detailed repro. As shown in the attached video, I start from a v0.24.0 environment in its default config and import one pcap, which on macOS populates a directory below ~/Library/Application Support/Brim/data/spaces. I then went to Preferences and set my Data Directory setting to ~/datadir and imported yet another pcap, which populates a directory below that destination.

Import.mp4

As noted above, at this point if I upgrade to a release that lacks the Brimcap with the fix in the linked PR (such as Brim commit 7b0b6df, using artifact https://storage.googleapis.com/brimsec-releases/brim/v0.25.0-prerelease-7b0b6df7.0/macos/Brim-0.25.0-prerelease-7b0b6df7.0.dmg) and allow the Space migration to proceed, we see the expected "Some spaces were not migrated" error. The data that I'd imported to the default Data Directory got migrated ok, but for the data I'd imported after changing to the custom Data Directory remained behind in that directory. A Pool is seen as created in anticipation of its migrated data, but it's empty.

Repro.mp4

@philrz
Copy link
Contributor

philrz commented Aug 23, 2021

Verified with a test artifact https://storage.googleapis.com/brimsec-releases/brim/v0.25.0-prerelease-24bfd33b.0/macos/Brim-0.25.0-prerelease-24bfd33b.0.dmg which is based on Brim commit b174140 but pointed at Brimcap commit 4f871b4 that has the benefit of the fix in the linked PR.

As shown in the attached video, having started from the same v0.24.0 state as in the repro above, now when upgrading to the newer release and proceeding with Space migration, the contents of both Spaces are successfully migrated to Pools. The directory and its contents for the Space below the custom Data Directory is deleted as part of the migration process, just as we see when the Space is coming from the default Data Directory.

Verify.mp4

While verifying this, I realized that the Data Directory setting may no longer have a purpose, so I've opened separate issue #1788 to pursue that.

Thanks @mattnibs!

@philrz philrz changed the title V24 Migration doesn't work with custom data directory v0.24.0 Space Migration doesn't work with custom data directory Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants