You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Tomás Fernández Löbbe (JIRA)" <ji...@apache.org> on 2018/03/30 22:45:00 UTC
[jira] [Commented] (SOLR-12172)
CollectionPropsTest.testReadWriteCached failure
[ https://issues.apache.org/jira/browse/SOLR-12172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16421032#comment-16421032 ]
Tomás Fernández Löbbe commented on SOLR-12172:
----------------------------------------------
I can reproduce this by adding a sleep in {{ZkStateReader.fetchCollectionProperties(...)}} like:
{code:java}
private Map<String, String> fetchCollectionProperties(String collection, Watcher watcher) throws KeeperException, InterruptedException {
final String znodePath = getCollectionPropsPath(collection);
while (true) {
try {
Stat stat = new Stat();
byte[] data = zkClient.getData(znodePath, watcher, stat, true);
Thread.sleep((int)(Math.random()*100));
return (Map<String, String>) Utils.fromJSON(data);
} catch (ClassCastException e) {
throw new SolrException(ErrorCode.SERVER_ERROR, "Unable to parse collection properties for collection " + collection, e);
} catch (KeeperException.NoNodeException e) {
if (watcher != null) {
// Leave an exists watch in place in case a collectionprops.json is created later.
Stat exists = zkClient.exists(znodePath, watcher, true);
if (exists != null) {
// Rare race condition, we tried to fetch the data and couldn't find it, then we found it exists.
// Loop and try again.
continue;
}
}
return Collections.emptyMap();
}
}
}
{code}
> CollectionPropsTest.testReadWriteCached failure
> -----------------------------------------------
>
> Key: SOLR-12172
> URL: https://issues.apache.org/jira/browse/SOLR-12172
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: Tests
> Reporter: Tomás Fernández Löbbe
> Priority: Major
>
> From: https://builds.apache.org/job/Lucene-Solr-BadApples-Tests-master/24
> {noformat}
> java.lang.AssertionError: Could not see value change after setting collection property. Name: property2, current value: value2, expected value: newValue
> at __randomizedtesting.SeedInfo.seed([1BCE6473A2A5E68A:FD89A9BD30939A79]:0)
> at org.junit.Assert.fail(Assert.java:93)
> at org.apache.solr.cloud.CollectionPropsTest.waitForValue(CollectionPropsTest.java:146)
> at org.apache.solr.cloud.CollectionPropsTest.testReadWriteCached(CollectionPropsTest.java:115){noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org