[ https://issues.apache.org/jira/browse/SOLR-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14153438#comment-14153438 ]
Steve Rowe commented on SOLR-6476: ---------------------------------- Thanks for the changes, Noble, those look fine - two new issues: # Didn't [~markrmil...@gmail.com] convert all timing stuff in Solr to use {{nanoTime()}} instead of {{System.getCurrentTimeMillis()}}? If so, shouldn't we use {{nanoTime()}} here too? (This applies to [~thelabdude]'s SOLR-6249 work as well.) # In {{SchemaManager.waitForOtherReplicasToUpdate()}}, called from {{doOperations()}}, you send {{-1}} in as {{maxWaitSecs}} to {{ManagedIndexSchema.waitForSchemaZkVersionAgreement()}} when the timeout has been exceeded, but AFAICT negative values aren't handled appropriately there, e.g. it gets sent in unexamined to {{ExecutorService.invokeAll()}}: {code:java} private List<String> doOperations(List<Operation> operations){ int timeout = req.getParams().getInt(BaseSolrResource.UPDATE_TIMEOUT_SECS, -1); long startTime = System.currentTimeMillis(); [...] managedIndexSchema.persistManagedSchema(false); core.setLatestSchema(managedIndexSchema); waitForOtherReplicasToUpdate(timeout, startTime); [...] } private void waitForOtherReplicasToUpdate(int timeout, long startTime) { if(timeout > 0 && [...]){ [...] ManagedIndexSchema.waitForSchemaZkVersionAgreement([...], getTimeLeftInSecs(timeout, startTime)); } } } private int getTimeLeftInSecs(int timeout, long startTime) { long timeLeftSecs = timeout - ((System.currentTimeMillis() - startTime) /1000); return (int) (timeLeftSecs > 0 ?timeLeftSecs: -1); } {code} > Create a bulk mode for schema API > --------------------------------- > > Key: SOLR-6476 > URL: https://issues.apache.org/jira/browse/SOLR-6476 > Project: Solr > Issue Type: Bug > Components: Schema and Analysis > Reporter: Noble Paul > Assignee: Noble Paul > Labels: managedResource > Attachments: SOLR-6476.patch, SOLR-6476.patch, SOLR-6476.patch, > SOLR-6476.patch, SOLR-6476.patch, SOLR-6476.patch, SOLR-6476.patch, > SOLR-6476.patch > > > The current schema API does one operation at a time and the normal usecase is > that users add multiple fields/fieldtypes/copyFields etc in one shot. > example > {code:javascript} > curl http://localhost:8983/solr/collection1/schema -H > 'Content-type:application/json' -d '{ > "add-field": { > "name":"sell-by", > "type":"tdate", > "stored":true > }, > "add-field":{ > "name":"catchall", > "type":"text_general", > "stored":false > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org