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

dat clone never exits #1064

Open
martindurant opened this issue Feb 21, 2019 · 5 comments
Open

dat clone never exits #1064

martindurant opened this issue Feb 21, 2019 · 5 comments

Comments

@martindurant
Copy link

The following basic command correctly fetched all the data, but then fails to exit, remaining at 100.00% but running.

dat dat://778f8d955175c92e4ced5e4f5563f69bfec0c86cc6f670352c457943666fe639 ~/temp/demo

DAT version: 13.11.5
node version: v8.11.3
OSX 10.13.6

  • a bug or unexpected behavior

Expected behavior

Data is downloaded, then process exits

Actual behavior

Process doesn't exit (requires ^C)

Debug Logs

  dat Dat DEBUG mode engaged, enabling quiet mode +0ms
  dat dat 13.11.5 +7ms
  dat node v8.11.3 +0ms
  dat Sync shortcut command +3ms
  dat Clone sync +1ms
  dat clone() +0ms
  dat { _: null,
  dat   utp: true,
  dat   debug: false,
  dat   quiet: true,
  dat   sparse: undefined,
  dat   version: false,
  dat   v: false,
  dat   logspeed: 400,
  dat   dir: '/Users/mdurant/temp/demo',
  dat   exit: false,
  dat   key: '<private>',
  dat   showKey: undefined } +0ms
  dat Checking directory for clone +8ms
  dat No existing directory, creating it. +1ms
  dat-node archive ready. version: 0 +0ms
  dat archive syncing +0ms
  dat-network Downloaded data: 311 +0ms
  dat-network Downloaded data: 543 +503ms
  dat-network Downloaded data: 131615 +501ms
  dat-network Downloaded data: 262687 +502ms
  dat-network Downloaded data: 524831 +501ms
  dat-network Downloaded data: 790897 +500ms
  dat-network Downloaded data: 987505 +505ms
  dat-network Downloaded data: 1184113 +500ms
  dat-network Downloaded data: 1380721 +501ms
  dat-network Downloaded data: 1380721 +504ms
  dat-network Downloaded data: 1380721 +504ms
  dat-network Downloaded data: 1380721 +502ms
  dat-network Downloaded data: 1380721 +501ms
  dat-network Downloaded data: 1380721 +501ms
  dat-network Downloaded data: 1380721 +502ms
  dat-network Downloaded data: 1380721 +502ms
  dat-network Downloaded data: 1380721 +504ms
  dat-network Downloaded data: 1380721 +501ms
  ...

xref: intake/intake#267

@joehand
Copy link
Collaborator

joehand commented Feb 21, 2019

@martindurant the "shortcut" command (without the clone argument) is not meant to exit, making it more useful for stateless applications. You can either:

  1. Use the clone argument:
dat clone <read-key> <dir>
  1. Add --exit to your current command:
dat <read-key> <dir> --exit

Let us know if that works. Thanks!

@martindurant
Copy link
Author

Neither the --exit nor the use of clone makes any difference, the process never ends.

@joehand
Copy link
Collaborator

joehand commented Feb 21, 2019

Hmmm... I can reproduce sometimes (and other times it exits fine). There may be something weird about that Dat, I cannot get 2 of the blocks of it on occasion but they seem to be available. (Can investigate that)

In the meantime, can you try dat://2c3bcbba714723fc95da82b17e3575627e98ed28da3f9815ec7e32245185c014. Same files, just a new metadata without any history.

@martindurant
Copy link
Author

That does work...

@martindurant
Copy link
Author

On the first clone at least. If I were to run clone again once the local copy exists, should it also exit, or should it get stuck in dat synced, waiting for updates.?

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

No branches or pull requests

2 participants