-
Notifications
You must be signed in to change notification settings - Fork 124
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
fixed index cache feature #137
Conversation
Current coverage is
|
+1! |
!this.indexes._canCreate && | ||
_.contains(['import', 'create', 'createCollection', 'putMapping', 'createOrUpdate'], requestObject.action) && | ||
!doesIndexExist(requestObject, indexes)) { | ||
_.contains(['import', 'create', 'createCollection', 'putMapping', 'createOrUpdate'], requestObject.action)) { |
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.
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.
Indeed. Good news is: merging this will be easy as in this PR, I only moved the last test to the first position, to make it clearer that it handles the case when an index or a collection doesn't exist.
+1 |
Conflicts: test/api/controllers/writeController.test.js
Conflicts: lib/api/controllers/adminController.js lib/api/controllers/writeController.js lib/api/core/models/security/role.js test/api/controllers/adminController.test.js test/services/implementations/elasticsearch.test.js
+1 |
Bugfix: the index cache was handled by the elasticsearch service, called both by the server instance and its workers. Problem is: workers didn't have access to the index cache, thus leading to non-catched errors.
indexCache
core componentkuzzle.indexes
withkuzzle.indexCache
, using the new core componentwrite
andadmin
controllerscleanDb
andprepareDb
now use and maintain the index cachecleanDb
andprepareDb
are now independant to Kuzzle to avoid adding unnecessary objects to the main context