File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
src/java/org/apache/cassandra/db/commitlog
test/unit/org/apache/cassandra/db Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 4848 * Improve compaction visibility (CASSANDRA-7242)
4949 * Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
5050 * Invalid key cache entries on DROP (CASSANDRA-6525)
51+ * Fix flapping RecoveryManagerTest (CASSANDRA-7084)
5152Merged from 1.2:
5253 * Add Cloudstack snitch (CASSANDRA-7147)
5354 * Update system.peers correctly when relocating tokens (CASSANDRA-7126)
Original file line number Diff line number Diff line change 2929import java .util .concurrent .atomic .AtomicLong ;
3030
3131import com .google .common .collect .Iterables ;
32+ import com .google .common .util .concurrent .Uninterruptibles ;
3233import org .slf4j .Logger ;
3334import org .slf4j .LoggerFactory ;
3435
3536import org .apache .cassandra .config .DatabaseDescriptor ;
3637import org .apache .cassandra .config .Schema ;
3738import org .apache .cassandra .db .ColumnFamilyStore ;
3839import org .apache .cassandra .db .Keyspace ;
39- import org .apache .cassandra .io .FSError ;
4040import org .apache .cassandra .io .util .FileUtils ;
4141import org .apache .cassandra .net .MessagingService ;
4242import org .apache .cassandra .service .StorageService ;
@@ -343,9 +343,11 @@ public void resetUnsafe()
343343 {
344344 logger .debug ("Closing and clearing existing commit log segments..." );
345345
346- while (!queue .isEmpty ())
346+ while (StorageService . tasks . getActiveCount () > 0 || !queue .isEmpty ())
347347 Thread .yield ();
348348
349+ Uninterruptibles .sleepUninterruptibly (10 , TimeUnit .MILLISECONDS );
350+
349351 for (CommitLogSegment segment : Iterables .concat (activeSegments , availableSegments ))
350352 segment .close ();
351353
Original file line number Diff line number Diff line change 2323import java .util .concurrent .ExecutionException ;
2424import java .util .concurrent .TimeUnit ;
2525
26+ import org .apache .cassandra .OrderedJUnit4ClassRunner ;
2627import org .apache .cassandra .Util ;
2728import org .junit .Assert ;
2829import org .junit .Test ;
30+ import org .junit .runner .RunWith ;
2931
3032import org .apache .cassandra .SchemaLoader ;
3133import org .apache .cassandra .db .commitlog .CommitLog ;
3537import static org .apache .cassandra .Util .column ;
3638import static org .apache .cassandra .db .KeyspaceTest .assertColumns ;
3739
40+ @ RunWith (OrderedJUnit4ClassRunner .class )
3841public class RecoveryManagerTest extends SchemaLoader
3942{
4043 @ Test
You can’t perform that action at this time.
0 commit comments