You won’t be able to do reads without a transaction, but once you have a 
transaction we only take a minimum amount of locks for reads.

The object cache does some locking when it loads up missing bits, or when it 
receives updates from write transactions. The object caches, other than ’none’, 
has a ConcurrentHashMap inside of them, which uses locks for thread-safety. 
Those locks are only held for very short periods of time, though, like for 
keeping out writes to the internal map-segment of interest while doing a 
look-up.

The new page cache will also be doing some locking when it page faults, or when 
it has to coordinate with writing transactions, or with evictions. However, 
when none of these things are going on, the page cache can do reads using only 
a couple of optimistic read-locks. These are as cheap as a couple of 
volatile-field reads and some bit twiddling.

Read-only transactions are otherwise effectively lock-free in 2.2, when 
everything is in memory and you don’t have interference from any write 
transactions.

--
Chris Vest
System Engineer, Neo Technology
[ skype: mr.chrisvest, twitter: chvest ]


> On 21 Jan 2015, at 22:37, Clark Richey <[email protected]> wrote:
> 
> Will the upcoming 2.2 release support reading without a locking transaction?
> 
> Thanks!
> 
> - Clark Richey
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to