You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/07/01 00:00:52 UTC

[GitHub] [solr] patsonluk commented on pull request #909: SOLR-16257: `ZkStateReader` changes to avoid race condition between `collectionWatches` and `watchedCollectionStates`

patsonluk commented on PR #909:
URL: https://github.com/apache/solr/pull/909#issuecomment-1171782061

   > Ok I think I'm on your side now. But I do think there is some confusion between having a `null` value in `collectionsWatches` and having a `null` `currentDoc` in the value. Can you explain that difference?
   
   For sure! There are 3 variations:
   1. `collectionWatches` does not have key for such collection - That means the collection is not being watched
   2. `collectionWatches.get("test-collection")` returns null, this should not happen, as all the entries insert into the map is non null
   3. `collectionWatches.get("test-collection")` does returns a `DocCollectionWatch` but has field `currentDoc` as `null`, that means the collection is actively watched, however either the `refreshAndWatch` is not called yet, or last fetched state indicates that the collection is not yet existed or deleted from ZK.
   
   
   > 
   > Also can we rename `currentDoc` to `currentState`? Also `DocCollectionWatch` would be better named `StatefulCollectionWatch`, because the important characteristic is that its saving the current state of the collection.
   > 
   > Thanks again for the work here!
   
   Agree thanks! Doing the renaming as suggested!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org