lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrzej Bialecki (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-12833) Use timed-out lock in DistributedUpdateProcessor
Date Tue, 23 Apr 2019 13:07:00 GMT

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

Andrzej Bialecki  commented on SOLR-12833:
------------------------------------------

Also, I was able to confirm that removing the {{int lockTimeoutMs}} doesn't affect memory
consumption due to object alignment:

 

* with {{lockTimeoutMs}}:
{code}
***** 64-bit VM, compressed references enabled: ***************************
org.apache.solr.update.VersionBucket object internals:
 OFFSET  SIZE                                   TYPE DESCRIPTION                         
     VALUE
      0    12                                        (object header)                     
     N/A
     12     4                                    int VersionBucket.lockTimeoutMs         
     N/A
     16     8                                   long VersionBucket.highest               
     N/A
     24     4        java.util.concurrent.locks.Lock VersionBucket.lock                  
     N/A
     28     4   java.util.concurrent.locks.Condition VersionBucket.condition             
     N/A
Instance size: 32 bytes
Space losses: 0 bytes internal + 0 bytes external = 0 bytes total
{code} 

* without {{lockTimeoutMs}}:
{code}
***** 64-bit VM, compressed references enabled: ***************************
org.apache.solr.update.VersionBucket object internals:
 OFFSET  SIZE                                   TYPE DESCRIPTION                         
     VALUE
      0    12                                        (object header)                     
     N/A
     12     4        java.util.concurrent.locks.Lock VersionBucket.lock                  
     N/A
     16     8                                   long VersionBucket.highest               
     N/A
     24     4   java.util.concurrent.locks.Condition VersionBucket.condition             
     N/A
     28     4                                        (loss due to the next object alignment)
Instance size: 32 bytes
Space losses: 0 bytes internal + 4 bytes external = 4 bytes total
{code}

> Use timed-out lock in DistributedUpdateProcessor
> ------------------------------------------------
>
>                 Key: SOLR-12833
>                 URL: https://issues.apache.org/jira/browse/SOLR-12833
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: update, UpdateRequestProcessors
>    Affects Versions: 7.5, 8.0
>            Reporter: jefferyyuan
>            Assignee: Mark Miller
>            Priority: Minor
>             Fix For: 7.7, 8.0
>
>         Attachments: SOLR-12833-noint.patch, SOLR-12833.patch, SOLR-12833.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> There is a synchronize block that blocks other update requests whose IDs fall in the
same hash bucket. The update waits forever until it gets the lock at the synchronize block,
this can be a problem in some cases.
>  
> Some add/update requests (for example updates with spatial/shape analysis) like may take
time (30+ seconds or even more), this would the request time out and fail.
> Client may retry the same requests multiple times or several minutes, this would make
things worse.
> The server side receives all the update requests but all except one can do nothing, have
to wait there. This wastes precious memory and cpu resource.
> We have seen the case 2000+ threads are blocking at the synchronize lock, and only a
few updates are making progress. Each thread takes 3+ mb memory which causes OOM.
> Also if the update can't get the lock in expected time range, its better to fail fast.
>  
> We can have one configuration in solrconfig.xml: updateHandler/versionLock/timeInMill,
so users can specify how long they want to wait the version bucket lock.
> The default value can be -1, so it behaves same - wait forever until it gets the lock.



--
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


Mime
View raw message