-
Notifications
You must be signed in to change notification settings - Fork 189
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
[full-ci] Use nats-js cache #7793
Conversation
c2f9a2f
to
0ca2c79
Compare
74b51a2
to
42755b2
Compare
927f9bc
to
62d5996
Compare
7837c80
to
b59ffbd
Compare
@@ -64,6 +64,8 @@ import ( | |||
var ( | |||
// runset keeps track of which services to start supervised. | |||
runset map[string]struct{} | |||
// time to wait after starting the preliminary services | |||
_preliminaryDelay = 6 * time.Second |
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.
So, we need to wait for nats to get the registry going? Does that mean that the micro registry and client / selector implementations die if they cannot talk to the actual registry? How is that supposed to work in a microservice architecture? Shouldn't services kind of assemble gracefully? Why is our built in supervisor so different than a kubernetes cluster?
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.
This is actually a good point, but I don't know how to avoid that for the moment.
In a perfect world they would assembly gracefully. But there is no such mechanism implemented for the registry (neither for the cash). If services can't connect to the registry they die immediately. Additionally, if services die during initialization of the single binary, they will not come up again (at least this what I observed in various runs).
Is the single binary supposed to restart services during initialization? Wouldn't that lead to infinite restarts when the services are misconfigured?
Why is our built in supervisor so different than a kubernetes cluster?
This question I don't understand. How could our selfmade supervisor be like a kubernetes cluster? Is it supposed to be?
b59ffbd
to
7712b0e
Compare
Signed-off-by: jkoberg <[email protected]>
Signed-off-by: jkoberg <[email protected]>
Signed-off-by: jkoberg <[email protected]>
Signed-off-by: jkoberg <[email protected]>
7712b0e
to
d62cb9d
Compare
Decided to use |
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.
I think we should separate the filemetadata caches of the storageproviders
Mmh. Not sure if this works. Aren't they invalidating each other? The pipeline will tell us... |
No, the filemetadata cache is only shared between the storageprovider and the dataprovider, which are runnign in the same service. The old stat cache was shared between gateway and storageproviders, but redis got clogged because we have to invalidate entries too often and the listing of keys via SCAN was too slow. Which is why we got rid of the 'cross service stat cache'. We should kill that code ... So, the storage-usets and storage-system caches are two completely distinct caches. We should configure the correspondingly. |
Co-authored-by: Jörn Friedrich Dreyer <[email protected]>
6e939b1
to
dbc50a6
Compare
@@ -85,7 +85,7 @@ type StorageRegistry struct { | |||
|
|||
// Cache holds cache config | |||
type Cache struct { | |||
StatCacheStore string `yaml:"stat_cache_store" env:"OCIS_CACHE_STORE;GATEWAY_STAT_CACHE_STORE" desc:"The type of the cache store. Supported values are: 'memory', 'ocmem', 'etcd', 'redis', 'redis-sentinel', 'nats-js', 'noop'. See the text description for details."` | |||
StatCacheStore string // NOTE: The stat cache is not working atm. Hence we block configuring it |
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.
@kobergj Note that this also needs a doc change, see:
admin docs and dev-docs. Pls update the gateway readme accordingly, I will take care on admin docs afterwards. Note, you maybe only comment out teh block to ease reenabling it when fuctional again... (I will do that on my side)
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.
Issue tackled here: #7977
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 2 New issues |
[full-ci] Use nats-js cache
Fixes and activates the nats-js cache
Fixes #7049