hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lars hofhansl <lhofha...@yahoo.com>
Subject Re: Concurrent use of RegionScanner.next
Date Sun, 09 Dec 2012 05:32:15 GMT
Alas... Store.notifyChangedReadersObservers, which calls updateReaders on all used StoreScanners,
foils my ingenious plan.

 From: lars hofhansl <lhofhansl@yahoo.com>
To: hbase-dev <dev@hbase.apache.org> 
Sent: Saturday, December 8, 2012 7:20 PM
Subject: Concurrent use of RegionScanner.next
Looking through the HRegion.RegionScannerImpl, I see various synchronized next(...) methods,
same for StoreScanner.
Scanners are created for Get operations and these scanners are guaranteed to be only used
from a single thread, so in that case all synchronization is pointless.

The client's next(...) operation is a bit more interesting.

Is anybody using scanners concurrently, such as calling next(...) on the *same* scanner from
multiple threads concurrently?

If not, we could enforce this once at the RegionServer level and have the entire path down
to HFileScannerVx unsynchronized.

Would this work? Any counterexamples?

A quick test shows that we could gain about 10-20% during a scan when everything is in cache.

-- Lars
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message