Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit e0b619e

Browse files
authored
reds_reverting_changes (#817)
1 parent 7110c24 commit e0b619e

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

event/src/main/java/com/bazaarvoice/emodb/event/db/astyanax/AstyanaxEventReaderDAO.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -340,19 +340,13 @@ public void readNewer(String channel, EventSink sink) {
340340
*/
341341
private Iterator<Column<ByteBuffer>> readManifestForChannel(final String channel, final boolean weak) {
342342
final ByteBuffer oldestSlab = weak ? _oldestSlab.getIfPresent(channel) : null;
343-
ConsistencyLevel consistency = ConsistencyLevel.CL_LOCAL_ONE ;//CL_LOCAL_QUORUM;;
344-
343+
final ConsistencyLevel consistency;
345344
RangeBuilder range = new RangeBuilder().setLimit(50);
346345
if (oldestSlab != null) {
347346
range.setStart(oldestSlab);
347+
consistency = ConsistencyLevel.CL_LOCAL_ONE;
348348
} else {
349-
350-
try{
351-
String _sysConsistency = System.getProperty("read-consistency");
352-
consistency = ConsistencyLevel.valueOf(_sysConsistency);
353-
} catch(Exception e){
354-
_log.debug("encountered exception while parsing ", e);
355-
}
349+
consistency = ConsistencyLevel.CL_LOCAL_QUORUM;
356350
}
357351

358352
final Iterator<Column<ByteBuffer>> manifestColumns = executePaginated(
@@ -405,7 +399,7 @@ private boolean readSlab(String channel, ByteBuffer slabId, SlabCursor cursor, b
405399
// Using a lower consistency level could result in (a) duplicate events because we miss deletes and (b)
406400
// incorrectly closing or deleting slabs when slabs look empty if we miss adds.
407401
ColumnList<Integer> eventColumns = execute(
408-
_keyspace.prepareQuery(ColumnFamilies.SLAB, ConsistencyLevel.CL_LOCAL_ONE)
402+
_keyspace.prepareQuery(ColumnFamilies.SLAB, ConsistencyLevel.CL_LOCAL_QUORUM)
409403
.getKey(slabId)
410404
.withColumnRange(start, Constants.OPEN_SLAB_MARKER, false, Integer.MAX_VALUE));
411405

0 commit comments

Comments
 (0)