Closed prodalex closed 3 months ago
old spaces are hypothesized root cause
possible solution is migrating spaces
Feedback from a user who create a new account and new space:
Problem: I have created a Space and uploaded the collection inside aprox 2.6gb but when I check my account inside the console I still see 0B of 5.0GB used
Steps taken:
OK.
I have reproduced this in my account using console.
out
value is ok
and has a positive non-zero allocated valueYes, sounds like you're on the right track.
This is the UCAN stream consumer that should be inserting into the space diffs table: https://github.com/storacha-network/w3infra/blob/main/billing/functions/ucan-stream.js
This is the function that filters stream messages to things we're interested in. Perhaps there is a bug here: https://github.com/storacha-network/w3infra/blob/bc4cb6b75d0164d69660ee30aec48dd85001d9ba/billing/lib/ucan-stream.js#L13-L55
reproduced in my account
add data works
kinesis stream puts the ucan into the firehose
I can find invocation in the UCAN S3 bucket
I cannot find it in any invocations of the billing ucanstream handler (which has logging)
Not in the space diff table
need to reproduce in cli
Summary of what I know currently:
I found this error in the billing ucan stream handler - not sure if helps:
2024-07-03T05:37:02.062Z 0fed54ff-23a7-47e0-a487-388e90deff04 ERROR Invoke Error
{
"errorType": "SyntaxError",
"errorMessage": "Unexpected non-whitespace character after JSON at position 69",
"stack": [
"SyntaxError: Unexpected non-whitespace character after JSON at position 69",
" at JSON.parse (<anonymous>)",
" at <anonymous> (/billing/functions/ucan-stream.js:65:23)",
" at Array.map (<anonymous>)",
" at parseUcanStreamEvent (/billing/functions/ucan-stream.js:64:16)",
" at <anonymous> (/billing/functions/ucan-stream.js:35:22)",
" at processResult (/node_modules/src/awslambda.ts:326:50)",
" at <anonymous> (/node_modules/src/awslambda.ts:370:50)",
" at <anonymous> (/node_modules/@sentry/src/tracing/trace.ts:163:15)",
" at handleCallbackErrors (/node_modules/@sentry/src/utils/handleCallbackErrors.ts:25:26)",
" at <anonymous> (/node_modules/@sentry/src/tracing/trace.ts:162:14)"
]
}
no that's just my mistake from when I put in the data incorrectly while testing the handler :)
I think we're behind on processing the stream. Latest receipt was issued at 2024-06-15T05:48:49.300Z
Your uploads happened on the 20th, 21st and 25th I believe.
Iterator age for the ucan stream handler:
For DynamoDB, Kinesis, and Amazon DocumentDB event sources, the age of the last record in the event. This metric measures the time between when a stream receives the record and when the event source mapping sends the event to the function.
Further background in this Slack message: https://filecoinproject.slack.com/archives/C027XP5BTGB/p1703109484136799
Steps to reproduce:
Expected result: