proposal: work on increasing the server throughout.#457
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 <[email protected]>
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.
@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.
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 ...