Use a tiny local cache to improve NoSQL upsert performance

If the application is using upsert we can avoid performing a query
against the database for the old object and just blind-write the new
and old index rows.  Since most NoSQL systems have higher round-trip
latency than they do per-row operation costs this should improve the
performance of most upsert operations.

During upsert we do try to avoid unnecessary index updates by
tracking the old copy of an object in a local cache.

Change-Id: I2f2aa7269f4049b86d5cb2c8d2079263335f37ec
Signed-off-by: Shawn O. Pearce <sop@google.com>
1 file changed