Skip to content
Discussion options

You must be logged in to vote

Technical Explanation: The L1 Cache Issue
The behavior you are experiencing is a classic case of Session-level Caching (L1 Cache) in OrientDB. When you use ODatabaseDocument (via OPartitionedDatabasePool), the driver keeps local copies of objects in memory to optimize performance.

However, when you execute an SQL UPDATE via db.command(), the local cache in your current session is not always automatically synchronized with the changes made on the server side.

  1. Why does this happen?
    OrientDB utilizes a Local Transaction Cache. When a record is loaded or created, it is stored in the cache of that specific db instance.

The Conflict: When you run db.command("UPDATE..."), it is processed as a …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tglman
Comment options

Answer selected by tglman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants