Allow to limit engine size for local scenarios #110
No reviewers
Labels
No labels
P0
P1
P2
P3
good first issue
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
7 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/xk6-frostfs#110
Loading…
Reference in a new issue
No description provided.
Delete branch "dstepanov-yadro/xk6-frostfs:feat/limit_shard_size"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Now it is possible to specify maximum data size for entire storage engine in local scenarios.
Output example (s3local.js):
Closes #106
f9dbd94a9b
to1e7cc95f61
@ -35,0 +37,4 @@
if c.l.IsFull() {
return PutResponse{
Success: false,
Error: "engine is full",
maybe
Limit reached
?fixed
@ -36,0 +40,4 @@
return PutResponse{
Success: false,
Abort: true,
Error: "engine is full",
same as above, feels like
Limit reached
rather thanengine is full
:)fixed
1e7cc95f61
toc7bdfcebb7
Using gigabytes here is probably ok, but I also created this #111
Having this in mind, maybe it is better to use bytes without units? Everyone will forget what the default units are.
Another option is to use
MAX_TOTAL_SIZE_GB
.@ -0,0 +54,4 @@
func (sl *sizeLimiter) IsFull() bool {
cur := sl.currentSize.Load()
// fmt.Printf("current %d, max %d\n", cur, sl.maxSize)
debug?
oops, fixed
@ -74,3 +76,3 @@
}
func NewLocalModuleInstance(vu modules.VU, resolveEngine func(context.Context, string, string, bool) (*engine.StorageEngine, error)) *Local {
func NewLocalModuleInstance(vu modules.VU, resolveEngine func(context.Context, string, string, bool, int) (*engine.StorageEngine, Limiter, error)) *Local {
Why is it
int
and notint64
? (we later convert anyway)Fixed. I thought JS number can be a maximum of 4 bytes, but it isn't so: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER
c7bdfcebb7
tobc47d66316
Fixed