f626cd1868
Satellite caches the project bandwidth in Redis when it doesn't have it because was not set or the key expired, however, it doesn't perform the check and set if not exists in a transaction. It also uses the increase function which increases the value if it exists otherwise it sets it. This provokes that multiple concurrent request to the same project may increase the total project by multiples of the bandwidth usage registered in the database rather than setting it because they may check if the key exists before any other has executed the increase and then the first one executing it will set the value but the others will increased causing that Redis has a wrong bandwidth usage value which is N magnitude of the real one and making the satellite to deny the downloading if it surpasses the project limit. This commit changes the "update"" project bandwidth usage by an "insert" but using a Redis function that only sets the value if the key doesn't exists for solving the increase issue but also not overriding the value due to may contain updates of other downloading requests which aren't already registered in the DB. Change-Id: I33e2fe462930b2fdb4061fc94002bd3544476f94 |
||
---|---|---|
.github | ||
certificate | ||
cmd | ||
crashcollect | ||
docs | ||
installer/windows | ||
multinode | ||
private | ||
resources | ||
satellite | ||
scripts | ||
storage | ||
storagenode | ||
testsuite | ||
versioncontrol | ||
web | ||
.dockerignore | ||
.gitattributes | ||
.gitignore | ||
.gitreview | ||
CODE_OF_CONDUCT.md | ||
CODEOWNERS | ||
CONTRIBUTING.md | ||
DEVELOPING.md | ||
docker-compose.tests.yaml | ||
go.mod | ||
go.sum | ||
Jenkinsfile | ||
Jenkinsfile.public | ||
LICENSE | ||
MAINTAINERS.md | ||
Makefile | ||
monkit.lock | ||
proto.lock | ||
README.md |
Storj V3 Network
Storj is building a decentralized cloud storage network. Check out our white paper for more info!
Storj is an S3-compatible platform and suite of decentralized applications that allows you to store data in a secure and decentralized manner. Your files are encrypted, broken into little pieces and stored in a global decentralized network of computers. Luckily, we also support allowing you (and only you) to retrieve those files!
Table of Contents
Contributing to Storj
All of our code for Storj v3 is open source. If anything feels off, or if you feel that some functionality is missing, please check out the contributing page. There you will find instructions for sharing your feedback, building the tool locally, and submitting pull requests to the project.
A Note about Versioning
While we are practicing semantic versioning for our client libraries such as uplink, we are not practicing semantic versioning in this repo, as we do not intend for it to be used via Go modules. We may have backwards-incompatible changes between minor and patch releases in this repo.
Start using Storj
Our wiki has documentation and tutorials. Check out these three tutorials:
License
This repository is currently licensed with the AGPLv3 license.
For code released under the AGPLv3, we request that contributors sign our Contributor License Agreement (CLA) so that we can relicense the code under Apache v2, or other licenses in the future.
Support
If you have any questions or suggestions please reach out to us on our community forum or file a ticket at https://support.storj.io/.