From b2b4156076109b7527f6d75b440b45572ae79a19 Mon Sep 17 00:00:00 2001
From: Vladimir Davydov <vdavydov@tarantool.org>
Date: Thu, 5 Dec 2024 16:11:39 +0300
Subject: [PATCH] vinyl: do not invalidate cache on commit after prepare

There's no point in doing so because if the committed tuple has been
overwritten by the time it's committed, the statement that overwrote
it must have already invalidated the cache, see `vy_tx_write()`.
The code invalidating the cache on commit was added along with the
cache implementation without any justification.

NO_DOC=minor
NO_TEST=minor
NO_CHANGELOG=minor

(cherry picked from commit 6ee49a5955893834fdaaf554d57d92d3f35992bc)
---
 src/box/vy_lsm.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/box/vy_lsm.c b/src/box/vy_lsm.c
index 584b37f098..2347bb802c 100644
--- a/src/box/vy_lsm.c
+++ b/src/box/vy_lsm.c
@@ -1021,9 +1021,6 @@ vy_lsm_commit_stmt(struct vy_lsm *lsm, struct vy_mem *mem,
 		vy_lsm_commit_upsert(lsm, mem, entry);
 
 	vy_stmt_counter_acct_tuple(&lsm->stat.put, entry.stmt);
-
-	/* Invalidate cache element. */
-	vy_cache_on_write(&lsm->cache, entry, NULL);
 }
 
 void
-- 
GitLab