[ https://issues.apache.org/jira/browse/HBASE-5329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13200479#comment-13200479 ]
Lars Hofhansl commented on HBASE-5329: -------------------------------------- Even if you get 1000 scanners per second you'd have to do that for 1 trillion (1.000.000.000) years to come into the ballpark of 2^64. The laws of big numbers are not intuitive. It is billions times more likely that your power fails, there're random bit errors, your harddrive dies, or datacenter is hit my a meteorite :). >From that viewpoint this is in fact not possible, because your hardware is not >going to live long enough to experience this. I really think we do not have to change this. > addRowLock() may allocate duplicate lock id, causing the client to be blocked > ----------------------------------------------------------------------------- > > Key: HBASE-5329 > URL: https://issues.apache.org/jira/browse/HBASE-5329 > Project: HBase > Issue Type: Bug > Components: regionserver > Affects Versions: 0.90.3 > Environment: Red Hat Enterprise Linux Server release 5.4 > Reporter: liaoxiangui > Assignee: Zhihong Yu > Priority: Critical > > {code} > protected long addRowLock(Integer r, HRegion region) throws > LeaseStillHeldException > { > long lockId = -1L; > lockId = rand.nextLong(); //!!!may generate duplicated > id,bug? > String lockName = String.valueOf(lockId); > rowlocks.put(lockName, r); > this.leases.createLease(lockName, new RowLockListener(lockName, > region)); > return lockId; > } > {code} > In addRowLock(),rand may generate duplicated lock id, it may cause > regionserver throw exception(Leases$LeaseStillHeldException).The client will > be blocked until old rowlock is released. > {code} > 2012-02-03 15:21:50,084 ERROR > org.apache.hadoop.hbase.regionserver.HRegionServer: Error obtaining row lock > (fsOk: true) > org.apache.hadoop.hbase.regionserver.Leases$LeaseStillHeldException > at > org.apache.hadoop.hbase.regionserver.Leases.createLease(Leases.java:150) > at > org.apache.hadoop.hbase.regionserver.HRegionServer.addRowLock(HRegionServer.java:1986) > at > org.apache.hadoop.hbase.regionserver.HRegionServer.lockRow(HRegionServer.java:1963) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:570) > at > org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1039) > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira