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

dbget fails when attempting to display slice of 8192 int64s #32

Open
Moleculor opened this issue Aug 12, 2021 · 2 comments
Open

dbget fails when attempting to display slice of 8192 int64s #32

Moleculor opened this issue Aug 12, 2021 · 2 comments
Labels
cantfix This is a bug I cannot fix due to a specific reason

Comments

@Moleculor
Copy link
Contributor

Moleculor commented Aug 12, 2021

I was attempting to find the 'true' available size of a DBEntry (since an int64 probably is only going to be taking up eight-or-so bytes, and not 18+ bytes) by taking a single slice with a single int64 (.Message.ID, specifically) in it and doubling it.

I got up to 8192 entries before YAGPDB complained I was trying to make a slice that was too large. (Apparently it won't make a slice of 16,384 entries.) So, just to see how big dbget said the DBEntry was, I tried to check its contents/size out with dbget. I got this instead:

image

(For searchability, I'll reproduce the text as best I can:

An error caused the execution of the custom command template to stop:
Failed executing CC #39, line 46, row 32: executing "CC #39" at <complexMessage "file...>: error calling complexMessage: file length for send message builder exceeded size limit

45    {{if or (gt (len (reReplace `​\...
46        {{$x = sendMessageRetID ni...
47        {{$out = (index (getMessag...

)

In case you were curious, dball shows the following:

image

(That's "155kB" in a 100kB entry. Yeah, I know, it counts JSON characters rather than anything closer to reality. Just thought you might be curious. A structure with 8192 8-byte numbers would be closer to 65kB. Ish. I think. Probably.)

(And yes, I'm actually planning on doing something that will end up with a slice with potentially that many int64s in it. More, really. Was thinking ahead to needing to do multiple DBEntries for it.)

@BlackWolfWoof
Copy link
Owner

I wish he had something that told is the exact size. Rn i am using json which has a few problems like that.
If i am not mistaken I saw someone making something that we can use to determine the exact size, but I do not think it has been implemented yet.

@l-zeuch
Copy link
Contributor

l-zeuch commented Aug 12, 2021

@BlackWolfWoof BlackWolfWoof added the cantfix This is a bug I cannot fix due to a specific reason label Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cantfix This is a bug I cannot fix due to a specific reason
Projects
None yet
Development

No branches or pull requests

3 participants