File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/cache Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -139,12 +139,6 @@ public boolean insert(Entry entry) {
139139 entryLength );
140140 }
141141
142- Position position = entry .getPosition ();
143- if (entries .exists (position )) {
144- // If the entry is already in the cache, don't insert it again
145- return false ;
146- }
147-
148142 ByteBuf cachedData ;
149143 if (copyEntries ) {
150144 cachedData = copyEntry (entry );
@@ -156,6 +150,7 @@ public boolean insert(Entry entry) {
156150 cachedData = entry .getDataBuffer ().retain ();
157151 }
158152
153+ Position position = entry .getPosition ();
159154 ReferenceCountedEntry cacheEntry =
160155 EntryImpl .createWithRetainedDuplicate (position , cachedData , entry .getReadCountHandler ());
161156 cachedData .release ();
You can’t perform that action at this time.
0 commit comments