summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/repo/indexed
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/amazon/carbonado/repo/indexed')
-rw-r--r--src/main/java/com/amazon/carbonado/repo/indexed/IndexedStorage.java6
-rw-r--r--src/main/java/com/amazon/carbonado/repo/indexed/ManagedIndex.java2
2 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/com/amazon/carbonado/repo/indexed/IndexedStorage.java b/src/main/java/com/amazon/carbonado/repo/indexed/IndexedStorage.java
index fb55433..6409da7 100644
--- a/src/main/java/com/amazon/carbonado/repo/indexed/IndexedStorage.java
+++ b/src/main/java/com/amazon/carbonado/repo/indexed/IndexedStorage.java
@@ -605,7 +605,7 @@ class IndexedStorage<S extends Storable> implements Storage<S>, StorageAccess<S>
// Doesn't completely remove the index, but it should free up space.
double desiredSpeed = mRepository.getIndexRepairThrottle();
- Throttle throttle = desiredSpeed < 1.0 ? new Throttle(POPULATE_THROTTLE_WINDOW) : null;
+ Throttle throttle = desiredSpeed < 1.0 ? new Throttle(BUILD_THROTTLE_WINDOW) : null;
if (throttle == null) {
indexEntryStorage.truncate();
@@ -624,7 +624,7 @@ class IndexedStorage<S extends Storable> implements Storage<S>, StorageAccess<S>
final long savedTotal = totalDropped;
boolean anyFailure = false;
try {
- while (count++ < POPULATE_BATCH_SIZE && cursor.hasNext()) {
+ while (count++ < BUILD_BATCH_SIZE && cursor.hasNext()) {
if (cursor.next().tryDelete()) {
totalDropped++;
} else {
@@ -650,7 +650,7 @@ class IndexedStorage<S extends Storable> implements Storage<S>, StorageAccess<S>
}
try {
- throttle.throttle(desiredSpeed, POPULATE_THROTTLE_SLEEP_PRECISION);
+ throttle.throttle(desiredSpeed, BUILD_THROTTLE_SLEEP_PRECISION);
} catch (InterruptedException e) {
throw new RepositoryException("Index removal interrupted");
}
diff --git a/src/main/java/com/amazon/carbonado/repo/indexed/ManagedIndex.java b/src/main/java/com/amazon/carbonado/repo/indexed/ManagedIndex.java
index 5806529..c667dde 100644
--- a/src/main/java/com/amazon/carbonado/repo/indexed/ManagedIndex.java
+++ b/src/main/java/com/amazon/carbonado/repo/indexed/ManagedIndex.java
@@ -29,7 +29,6 @@ import com.amazon.carbonado.CorruptEncodingException;
import com.amazon.carbonado.Cursor;
import com.amazon.carbonado.FetchException;
import com.amazon.carbonado.IsolationLevel;
-import com.amazon.carbonado.OptimisticLockException;
import com.amazon.carbonado.PersistException;
import com.amazon.carbonado.Query;
import com.amazon.carbonado.Repository;
@@ -388,7 +387,6 @@ class ManagedIndex<S extends Storable> implements IndexEntryAccessor<S> {
txn = repo.enterTopTransaction(IsolationLevel.READ_COMMITTED);
try {
-
for (Object obj : buffer) {
Storable indexEntry = (Storable) obj;
if (indexEntry.tryInsert()) {