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

w3 usage report reports non-zero size on an empty space #1182

Closed
Prunkles opened this issue Nov 25, 2023 · 8 comments
Closed

w3 usage report reports non-zero size on an empty space #1182

Prunkles opened this issue Nov 25, 2023 · 8 comments
Assignees

Comments

@Prunkles
Copy link

Prunkles commented Nov 25, 2023

$ w3 can upload ls --json
# (nothing)

$ w3 can store ls --json
# (nothing)

$ w3 usage report --json 
{"account":"","provider":"did:web:web3.storage","reportedAt":"2023-11-25T21:28:11.019Z","size":{"final":5979460100,"initial":0},"space":""}
# about 6 GiB

Previously I tried to upload a 10GiB file, but it crashed due to high memory usage during sharding, and after that there were some shards left in the space but no uploads, so I removed these shards manually. And after that the space size isn't reported as empty. Am I missing something or is this a bug?

@alanshaw
Copy link
Member

alanshaw commented Dec 4, 2023

Yes likely a bug. I will take a look and get back to you.

@alanshaw
Copy link
Member

alanshaw commented Dec 4, 2023

We are double counting when attempting to store items already in the space. This PR should fix #1213 (but then also needs some cleanup).

@Prunkles
Copy link
Author

The PR is merged, but the issue seems to still be actual. What do you mean by "some cleanup"?

@alanshaw
Copy link
Member

I'm still working on the cleanup - will ping when done!

@alanshaw
Copy link
Member

@Prunkles can you verify that this has been resolved?

@Prunkles
Copy link
Author

Seems not:

$ w3up space ls
* did:key:z6Mkp15j9qubtSPKNmZKPHjwmbWo9ksfuXaQKVqGZXNs6HS7
$ w3up can upload ls --json
{"root":{"/":"bafybeigmzb7djk7nafhppx5ogjqknwtshjqlmac7uj3fqwoi2qwq3acaee"},"shards":[{"/":"bagbaiera6l6madcaz7xwk5bceontt6feqxahby7dtcvdoydnvzwhs76wy3dq"}]}
$ w3up can store ls --json 
{"link":{"/":"bagbaiera6l6madcaz7xwk5bceontt6feqxahby7dtcvdoydnvzwhs76wy3dq"},"size":36513400}
$ w3up usage report --json 
{"account":"","provider":"did:web:web3.storage","reportedAt":"2024-01-11T17:06:41.354Z","size":{"final":5751722484,"initial":5715209084},"space":"did:key:z6Mkp15j9qubtSPKNmZKPHjwmbWo9ksfuXaQKVqGZXNs6HS7"}
# about 5.3 GiB

(the space actually had one object, but its size is way smaller than the reported size)

But the final size seems decreased a bit

@alanshaw
Copy link
Member

alanshaw commented Feb 8, 2024

@Prunkles can you please verify now?

@Prunkles
Copy link
Author

Prunkles commented Feb 8, 2024

@alanshaw

$ w3up can store ls --json
{"link":{"/":"bagbaiera6l6madcaz7xwk5bceontt6feqxahby7dtcvdoydnvzwhs76wy3dq"},"size":36513400}
$ w3up can upload ls --json
{"root":{"/":"bafybeigmzb7djk7nafhppx5ogjqknwtshjqlmac7uj3fqwoi2qwq3acaee"},"shards":[{"/":"bagbaiera6l6madcaz7xwk5bceontt6feqxahby7dtcvdoydnvzwhs76wy3dq"}]}
$ w3up usage report --json 
{"account":"","provider":"did:web:web3.storage","reportedAt":"2024-02-08T14:55:08.944Z","size":{"final":36513400,"initial":36513400},"space":"did:key:z6Mkp15j9qubtSPKNmZKPHjwmbWo9ksfuXaQKVqGZXNs6HS7"}

Seems fixed. Thank you!

@Prunkles Prunkles closed this as completed Feb 8, 2024
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