textileio / go-textile

[DEPRECATED] Textile is a set of tools and infrastructure for building composable apps and services on the IPFS network
https://textile.io
MIT License
357 stars 43 forks source link

Can't unpin blocks when leaving thread #854

Open flyskywhy opened 5 years ago

flyskywhy commented 5 years ago

Describe the bug

244 said Unpin all blocks and data when leaving thread and that issue is closed, but the "unpin" is not working.

To Reproduce Steps to reproduce the behavior:

  1. textile init
  2. start textile daemon
  3. textile threads add "foobar" --blob -t open -s shared
  4. textile messages add THE_FOOBAR_THREAD_ID "a5a5A5A5" and see the BLOCK_ID QmbMCEYu2HUkp7DcYX6SHW2o4dmEDTdSqfNKwMCxWsVHS8
  5. stop textile daemon to use ipfs command later
  6. IPFS_PATH=~/.textile/repo/ ipfs pin ls | sort and found the BLOCK_ID QmbMCEYu2HUkp7DcYX6SHW2o4dmEDTdSqfNKwMCxWsVHS8
  7. start textile daemon
  8. textile threads abandon THE_FOOBAR_THREAD_ID
  9. stop textile daemon to use ipfs command later
  10. IPFS_PATH=~/.textile/repo/ ipfs pin ls | sort and the BLOCK_ID QmbMCEYu2HUkp7DcYX6SHW2o4dmEDTdSqfNKwMCxWsVHS8 still exist!

Even more pin grows, see logs by IPFS_PATH=~/.textile/repo/ ipfs pin ls | sort with each steps above: after step 2(just init and daemon):

  QmRe5yEoGDVKog9TwhDTotAS3zvN6E8ZtGVH7La3w3XQ1y direct
  QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn recursive
  QmXvw4YgmyfHt7iYzmjVQBdJW7T1oFrZmiMSj2cFBBdL9H direct

after step 3(threads add):

+ QmbVG16LQp3h1bBhztbRTcEGTo4ke3z2hN1uu53voqyTge direct
+ QmQn4hHm42sou9YFWSCAsmHJ7kCAf2cXU9TXQTxS5CLdvL direct
  QmRe5yEoGDVKog9TwhDTotAS3zvN6E8ZtGVH7La3w3XQ1y direct
  QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn recursive
+ QmX5hDjNCbxPqoeRFQu2Jv5A41MyYYAa3TPYuB4wvorwJj direct
  QmXvw4YgmyfHt7iYzmjVQBdJW7T1oFrZmiMSj2cFBBdL9H direct

after step 4(messages add):

+ QmbMCEYu2HUkp7DcYX6SHW2o4dmEDTdSqfNKwMCxWsVHS8 direct
  QmbVG16LQp3h1bBhztbRTcEGTo4ke3z2hN1uu53voqyTge direct
+ QmdhsrtMquh8wXmBxbhiqAqGVujhi5Ycg946Qznk1qxnyW direct
+ QmQ7gfxv5WXcrvvjUS2La57ujb4L8mdAGXZ3xk7Nto5TPJ direct
  QmQn4hHm42sou9YFWSCAsmHJ7kCAf2cXU9TXQTxS5CLdvL direct
  QmRe5yEoGDVKog9TwhDTotAS3zvN6E8ZtGVH7La3w3XQ1y direct
  QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn recursive
  QmX5hDjNCbxPqoeRFQu2Jv5A41MyYYAa3TPYuB4wvorwJj direct
  QmXvw4YgmyfHt7iYzmjVQBdJW7T1oFrZmiMSj2cFBBdL9H direct

after step 8(threads abandon):

  QmbMCEYu2HUkp7DcYX6SHW2o4dmEDTdSqfNKwMCxWsVHS8 direct
  QmbVG16LQp3h1bBhztbRTcEGTo4ke3z2hN1uu53voqyTge direct
  QmdhsrtMquh8wXmBxbhiqAqGVujhi5Ycg946Qznk1qxnyW direct
  QmQ7gfxv5WXcrvvjUS2La57ujb4L8mdAGXZ3xk7Nto5TPJ direct
  QmQn4hHm42sou9YFWSCAsmHJ7kCAf2cXU9TXQTxS5CLdvL direct
  QmRe5yEoGDVKog9TwhDTotAS3zvN6E8ZtGVH7La3w3XQ1y direct
+ QmSMakugWZHYCpT35rSV9DDdgxEwbvCydRMjqaLMCdke6u direct
  QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn recursive
  QmX5hDjNCbxPqoeRFQu2Jv5A41MyYYAa3TPYuB4wvorwJj direct
  QmXvw4YgmyfHt7iYzmjVQBdJW7T1oFrZmiMSj2cFBBdL9H direct

Expected behavior Should unpin the BLOCK_ID comes from message. Even should unpin more HASH refer to the "+" symbol I added in logs.

CLI: