storj-archived / core

Deprecated. Implementation of the Storj v2 protocol for Node.js.
https://storj.io
Other
396 stars 88 forks source link

Full farmer doesn't update spaceAvailable #738

Closed littleskunk closed 5 years ago

littleskunk commented 6 years ago

Package Versions

Replace the values below using the output from npm list storj. Use npm list -g storj if installed globally.

GUI 7.1.0
Daemon 5.1.0
Core 8.1.0
Protocol 1.2.0

Expected Behavior

Please describe the program's expected behavior. Include an example of your usage code in the back ticks below if applicable.

Farmer has 100% used space. Farmer will not send any OFFER / ALLOC response. I would expect the bridge stop sending him ALLOC messages.

Actual Behavior

Please describe the program's actual behavior. Please include any stack traces or log output in the back ticks below.

Farmer is not updating spaceAvailable.

lastSeen | "2017-10-07T11:16:42.553Z"
userAgent | "8.1.0"
protocol | "1.2.0"
responseTime | 7166.1082562115425
lastTimeout | "2017-10-05T20:52:17.893Z"
timeoutRate | 0.0012922222222222222
spaceAvailable | true
lastContractSent | 1507387497734

Bridge keeps sending ALLOC messages but will not get any response. Sooner or later all low responseTime farmer are full. No ALLOC reponse.

    Line 512: {"level":"debug","message":"we have enough free space: false","timestamp":"2017-10-07T14:24:59.722Z"}
    Line 524: {"level":"debug","message":"we have enough free space: false","timestamp":"2017-10-07T14:25:00.197Z"}
    Line 1350: {"level":"debug","message":"we have enough free space: false","timestamp":"2017-10-07T14:28:16.133Z"}
    Line 1361: {"level":"debug","message":"we have enough free space: false","timestamp":"2017-10-07T14:28:16.279Z"}
    Line 1373: {"level":"debug","message":"we have enough free space: false","timestamp":"2017-10-07T14:28:16.662Z"}
    Line 1465: {"level":"debug","message":"we have enough free space: false","timestamp":"2017-10-07T14:32:03.552Z"}
    Line 1744: {"level":"debug","message":"we have enough free space: false","timestamp":"2017-10-07T14:35:28.294Z"}
    Line 1831: {"level":"debug","message":"we have enough free space: false","timestamp":"2017-10-07T14:39:11.668Z"}
    Line 1843: {"level":"debug","message":"we have enough free space: false","timestamp":"2017-10-07T14:39:11.781Z"}

Steps to Reproduce

Please include the steps the reproduce the issue, numbered below. Include as much detail as possible.

  1. Get a low responseTime and wait for the high ALLOC frequency
  2. Reduce allocated space to 1 Byte.
braydonf commented 6 years ago

We initially had spaceAvailable set to false when a bucket was filled, when a shard is received., However since there are 256 buckets, it can set it to false too early. Checking all buckets seems like it would cause performance issues.

braydonf commented 6 years ago

spaceAvailable is set to false when there isn't any disk space available.

braydonf commented 6 years ago

Another reason for https://github.com/Storj/core/issues/723, needs to be better usage tracking.

RichardLitt commented 5 years ago

👋 Hey! Thanks for this contribution. Apologies for the delay in responding!

We've decided to rearchitect Storj, so that we can scale better. You can read more about this decision here. This means that we are entirely focused on v3 at the moment, in the storj/storj repository. Our white paper for v3 is coming very, very soon - follow along on the blog and in our Rocketchat.

As this repository is part of the v2 network, we're no longer maintaining this repository. I am going to close this for now. If you have any questions, I encourage you to jump on Rocketchat and ask them there. Thanks!