[ 
https://issues.apache.org/jira/browse/SOLR-6476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14155455#comment-14155455
 ] 

Ramkumar Aiyengar commented on SOLR-6476:
-----------------------------------------

bq. actually System.currentTimeMillis() is fine if used in the same thread . 
And if it is used in different threads it can give wrong values.

It's nothing to do with the number of threads. currentTimeMillis uses the wall 
time and is not guaranteed to be monotonic. So if the sysadmin or ntp for 
example changes time (or horror, if your system time uses local time and you 
cross a DST transition), the difference in value between two measurements is 
not guaranteed to reflect the actual duration of time. So in this case for 
example you might end up violating the timeout altogether. nanoTime essentially 
exposes a counter which keeps increasing, so while it has no bearing on the 
system time (so a value by itself is meaningless), differences are guaranteed 
to be accurate.  (Well, as long as the platform supports it, which is almost 
everywhere except for some random old versions of Windows).

> Create a bulk mode for schema API
> ---------------------------------
>
>                 Key: SOLR-6476
>                 URL: https://issues.apache.org/jira/browse/SOLR-6476
>             Project: Solr
>          Issue Type: New Feature
>          Components: Schema and Analysis
>            Reporter: Noble Paul
>            Assignee: Noble Paul
>              Labels: managedResource
>             Fix For: 5.0, Trunk
>
>         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

Reply via email to