Skip to content

Commit

Permalink
STASH.
Browse files Browse the repository at this point in the history
  • Loading branch information
finnegancarroll committed Jun 11, 2024
1 parent 3a89cfa commit 09f939f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
6 changes: 5 additions & 1 deletion gradle/run.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,13 @@ testClusters {
}

// DEBUG SETTINGS - DO NOT COMMIT
setting 'node.search.cache.size', '100b'
//setting 'cluster.filecache.remote_data_ratio', '0'

setting 'node.roles', '[data,ingest,cluster_manager,search]'
setting 'node.search.cache.size', '13b'
// setting 'node.roles', '[search]'
setting 'path.repo', '/Users/carrofin/fdev/DEBUG/STORES/SNAPS'
// setting 'path.data', '/fakemount'
setting 'path.data', '/Users/carrofin/fdev/DEBUG/STORES/DATA'

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public void close() throws IOException {
if (input != null) {
input.close();
}
// cloneRefs.remove(ref); // For now don't remove for debugging
cloneRefs.remove(ref);
}
}
super.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,11 @@ public void incRef(K key) {
lru.remove(node.key);
}

// INC REF debug statement
node.refCount++;
}
System.out.println("INC REF: " + node.key.toString() + " to " + node.refCount);

}
} finally {
lock.unlock();
}
Expand All @@ -239,7 +241,14 @@ public void decRef(K key) {
try {
Node<K, V> node = data.get(key);
if (node != null && node.refCount > 0) {

// DEC REF debug statement
node.refCount--;
System.out.println("DEC REF: " + node.key.toString() + " to " + node.refCount);

if (node.refCount == 0) {
System.out.println("0000000000000000000000000 " + node.key.toString());
}

if (node.evictable()) {
// if it becomes evictable, we should add it to eviction list
Expand Down Expand Up @@ -360,6 +369,9 @@ private void evict() {
data.remove(node.key, node);
usage -= node.weight;
statsCounter.recordEviction(node.weight);

System.out.println("EVICTING FILE -: " + node.key.toString());

listener.onRemoval(new RemovalNotification<>(node.key, node.value, RemovalReason.CAPACITY));
}
}
Expand Down

0 comments on commit 09f939f

Please sign in to comment.