Closed caleblloyd closed 7 months ago
We calculate based on available so I think that is correct, plus this is more for easy setup etc but does not reflect reality where the user should set this number in their config.
But do note that it will protect the system correctly in my opinion on restarts.
@caleblloyd Is this still a relevant issue?
Right now the JetStream Max Store Size calculation only takes into account Available disk. So each time you write data to JetStream and restart the server, it goes down:
https://github.com/nats-io/nats-server/blob/6e6ce3a6f65aed54bb7dea60d2a8ed42046a7627/server/disk_avail.go#L30C1-L33
Example:
I start with a
10GB
disk and it calculates:Then, I write
5GB
of data to a stream. Now when I restart the server it calculates:The
5GB
stream is now over the Max Storage limit and cannot be written to anymore, although I could consume from it.Also the 75% calculation is undocumented, JS Docs say
Up to 1TB if available
Might be nice to have a few more knobs to turn, such as being able to set
% of Disk
andFixed Overhead