-
Notifications
You must be signed in to change notification settings - Fork 83
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
added class check when deleteDocs in multishard setup #103
base: master
Are you sure you want to change the base?
Conversation
@@ -898,7 +898,8 @@ public function removeObjectById( $contentObjectId, $commit = null ) | |||
{ | |||
foreach ( $docs as $languageCode => $doc ) | |||
{ | |||
$this->SolrLanguageShards[$languageCode]->deleteDocs( array( $doc ), false, $commit, $optimize ); | |||
if ($this->SolrLanguageShards[$languageCode] instanceof eZSolrBase ) |
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.
CS: space after "("
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.
nitpicker :P
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 what ? ;-)
If this had been on one of the bigger repos, ezrobot would have said it, and not in a nice way ;-)
Sounds overall like a bit of a crude fix. We should probably ensure that the language isn't added to SolrLanguageShards if it isn't mapped, but it may not be worth it at this point. +1 with the CS fix. Any counter opinion ? @paulborgermans ? |
This looks like a crude fix, in the sense that it adds robustness towards ezfind.ini options for missing core mappings to languages. Now, if the language to core mapping is absent for some, it wont be indexed either afaik. In case of a multi-core setup, it is still possible to assign the same core to multiple languages and this is what is intended (but maybe not documented enough). @ivo: can you enlighten me how non-mapped languages are indexed in the first place? Isnt there another change/patch in use then which is omitted here? |
Don't know about some other patch. It might exists as this problem was noted on 2012.6 version. |
In situation when there is more languages enabled in ezp but there are not all mapped to solr shards (multi-shard setup), object removal crashes. To prevent this we need to check if there is a shard mapped or not.