-
Notifications
You must be signed in to change notification settings - Fork 409
proposal: work on increasing the server throughout. #457
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
Conversation
The patch includes: * increases most of the museum api throughout by wrapping the event emitter into goroutine since the event listener already holds on the concurrent lock(#396). * adds the new server option `keep-chart-always-up-to-date` to force use the latest version. * `getIndexFile` rollbacks to fully reload index only if cacheinterval not set for better backward compatibility before v0.13.0(#444). Signed-off-by: scnace <scbizu@gmail.com>
92bf1eb to
d70bb01
Compare
| if server.KeepChartAlwaysUpToDate { | ||
| // waiting for the index regeneration and keep the entry index always up-to-date | ||
| server.Tenants[repo].RegenerationLock.Lock() | ||
| defer server.Tenants[repo].RegenerationLock.Unlock() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@scbizu - can you explain this a bit? I thought KeepChartAlwaysUpToDate would use the old logic prior to adding emitEvent stuff?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To rollback the old logic we may not need to add the new option KeepChartAlwaysUpToDate , we only need to check whether the cache-interval is set or not , and we will use the old logic if cache-interval not set , otherwise , set the provided cache interval, and enables the event emitter.
My original purpose adding the new option KeepChartAlwaysUpToDate is that if we can have some mechanisms to always get the latest chart with the event emitter is enabled.
|
@scbizu can you rebase? |
|
This pr is not fully tested , maybe should be delayed into v0.14.1 or later version. I convert it to draft for now . |
|
I want to close this PR , and cherry pick some commits out (such as the fix for #498 ). BTW I really forget this PR , thanks for reminding me of this . |
|
Moved to #593 |
The patch includes:
increases most of the museum api throughout by wrapping the event
emitter into goroutine since the event listener already holds on the
concurrent lock(loadtesting: request rate for uploading charts drops a lot with latest version #396).
adds the new server option
keep-chart-always-up-to-dateto force usethe latest version. (maybe not always work in high concurrent environment)
getIndexFilerollbacks to fully reload index only if cacheintervalnot set for better backward compatibility before v0.13.0(index.yaml not regenerated when chart added to s3 bucket #444).
But still need some more load-testing ...