/** * Wait for any appends or discardUnusedTail() operations started before this method was called */ void waitForModifications() { // issue a barrier and wait for it appendOrder.awaitNewBarrier(); }
/** * Wait for any appends started before this method was called. */ void waitForModifications() { appendOrder.awaitNewBarrier(); // issue a barrier and wait for it }
/** * Wait for any appends started before this method was called. */ void waitForModifications() { appendOrder.awaitNewBarrier(); // issue a barrier and wait for it }
/** * Wait for any appends or discardUnusedTail() operations started before this method was called */ void waitForModifications() { // issue a barrier and wait for it appendOrder.awaitNewBarrier(); }
/** * Wait for any appends or discardUnusedTail() operations started before this method was called */ void waitForModifications() { // issue a barrier and wait for it appendOrder.awaitNewBarrier(); }
/** * Wait for any appends or discardUnusedTail() operations started before this method was called */ void waitForModifications() { // issue a barrier and wait for it appendOrder.awaitNewBarrier(); }
/** * Wait for any appends started before this method was called. */ void waitForModifications() { appendOrder.awaitNewBarrier(); // issue a barrier and wait for it }
private void invalidate() { // interrupt in-progress compactions Collection<ColumnFamilyStore> cfss = Collections.singleton(indexCfs); CompactionManager.instance.interruptCompactionForCFs(cfss, true); CompactionManager.instance.waitForCessation(cfss); Keyspace.writeOrder.awaitNewBarrier(); indexCfs.forceBlockingFlush(); indexCfs.readOrdering.awaitNewBarrier(); indexCfs.invalidate(); }
private void invalidate() { // interrupt in-progress compactions Collection<ColumnFamilyStore> cfss = Collections.singleton(indexCfs); CompactionManager.instance.interruptCompactionForCFs(cfss, true); CompactionManager.instance.waitForCessation(cfss); Keyspace.writeOrder.awaitNewBarrier(); indexCfs.forceBlockingFlush(); indexCfs.readOrdering.awaitNewBarrier(); indexCfs.invalidate(); }
private void invalidate() { // interrupt in-progress compactions Collection<ColumnFamilyStore> cfss = Collections.singleton(indexCfs); CompactionManager.instance.interruptCompactionForCFs(cfss, true); CompactionManager.instance.waitForCessation(cfss); Keyspace.writeOrder.awaitNewBarrier(); indexCfs.forceBlockingFlush(); indexCfs.readOrdering.awaitNewBarrier(); indexCfs.invalidate(); }
public void dropCf(UUID cfId) { assert columnFamilyStores.containsKey(cfId); ColumnFamilyStore cfs = columnFamilyStores.remove(cfId); if (cfs == null) return; cfs.getCompactionStrategyManager().shutdown(); CompactionManager.instance.interruptCompactionForCFs(cfs.concatWithIndexes(), true); // wait for any outstanding reads/writes that might affect the CFS cfs.keyspace.writeOrder.awaitNewBarrier(); cfs.readOrdering.awaitNewBarrier(); unloadCf(cfs); }
public void dropCf(UUID cfId) { assert columnFamilyStores.containsKey(cfId); ColumnFamilyStore cfs = columnFamilyStores.remove(cfId); if (cfs == null) return; cfs.getCompactionStrategyManager().shutdown(); CompactionManager.instance.interruptCompactionForCFs(cfs.concatWithIndexes(), true); // wait for any outstanding reads/writes that might affect the CFS cfs.keyspace.writeOrder.awaitNewBarrier(); cfs.readOrdering.awaitNewBarrier(); unloadCf(cfs); }
public void dropCf(UUID cfId) { assert columnFamilyStores.containsKey(cfId); ColumnFamilyStore cfs = columnFamilyStores.remove(cfId); if (cfs == null) return; cfs.getCompactionStrategyManager().shutdown(); CompactionManager.instance.interruptCompactionForCFs(cfs.concatWithIndexes(), true); // wait for any outstanding reads/writes that might affect the CFS cfs.keyspace.writeOrder.awaitNewBarrier(); cfs.readOrdering.awaitNewBarrier(); unloadCf(cfs); }
public void dropCf(UUID cfId) { assert columnFamilyStores.containsKey(cfId); ColumnFamilyStore cfs = columnFamilyStores.remove(cfId); if (cfs == null) return; cfs.getCompactionStrategy().shutdown(); CompactionManager.instance.interruptCompactionForCFs(cfs.concatWithIndexes(), true); // wait for any outstanding reads/writes that might affect the CFS cfs.keyspace.writeOrder.awaitNewBarrier(); cfs.readOrdering.awaitNewBarrier(); unloadCf(cfs); }
Keyspace.writeOrder.awaitNewBarrier();
Keyspace.writeOrder.awaitNewBarrier();
Schema.instance.clearKeyspaceDefinition(ksm); keyspace.writeOrder.awaitNewBarrier();
public void dropKeyspace(String ksName) { KeyspaceMetadata ksm = Schema.instance.getKSMetaData(ksName); String snapshotName = Keyspace.getTimestampedSnapshotNameWithPrefix(ksName, ColumnFamilyStore.SNAPSHOT_DROP_PREFIX); CompactionManager.instance.interruptCompactionFor(ksm.tablesAndViews(), true); Keyspace keyspace = Keyspace.open(ksm.name); // remove all cfs from the keyspace instance. List<UUID> droppedCfs = new ArrayList<>(); for (CFMetaData cfm : ksm.tablesAndViews()) { ColumnFamilyStore cfs = keyspace.getColumnFamilyStore(cfm.cfName); unload(cfm); if (DatabaseDescriptor.isAutoSnapshot()) cfs.snapshot(snapshotName); Keyspace.open(ksm.name).dropCf(cfm.cfId); droppedCfs.add(cfm.cfId); } // remove the keyspace from the static instances. Keyspace.clear(ksm.name); clearKeyspaceMetadata(ksm); Keyspace.writeOrder.awaitNewBarrier(); // force a new segment in the CL CommitLog.instance.forceRecycleAllSegments(droppedCfs); MigrationManager.instance.notifyDropKeyspace(ksm); }
public void dropKeyspace(String ksName) { KeyspaceMetadata ksm = Schema.instance.getKSMetaData(ksName); String snapshotName = Keyspace.getTimestampedSnapshotNameWithPrefix(ksName, ColumnFamilyStore.SNAPSHOT_DROP_PREFIX); CompactionManager.instance.interruptCompactionFor(ksm.tablesAndViews(), true); Keyspace keyspace = Keyspace.open(ksm.name); // remove all cfs from the keyspace instance. List<UUID> droppedCfs = new ArrayList<>(); for (CFMetaData cfm : ksm.tablesAndViews()) { ColumnFamilyStore cfs = keyspace.getColumnFamilyStore(cfm.cfName); unload(cfm); if (DatabaseDescriptor.isAutoSnapshot()) cfs.snapshot(snapshotName); Keyspace.open(ksm.name).dropCf(cfm.cfId); droppedCfs.add(cfm.cfId); } // remove the keyspace from the static instances. Keyspace.clear(ksm.name); clearKeyspaceMetadata(ksm); Keyspace.writeOrder.awaitNewBarrier(); // force a new segment in the CL CommitLog.instance.forceRecycleAllSegments(droppedCfs); MigrationManager.instance.notifyDropKeyspace(ksm); }
public void dropKeyspace(String ksName) { KeyspaceMetadata ksm = Schema.instance.getKSMetaData(ksName); String snapshotName = Keyspace.getTimestampedSnapshotNameWithPrefix(ksName, ColumnFamilyStore.SNAPSHOT_DROP_PREFIX); CompactionManager.instance.interruptCompactionFor(ksm.tablesAndViews(), true); Keyspace keyspace = Keyspace.open(ksm.name); // remove all cfs from the keyspace instance. List<UUID> droppedCfs = new ArrayList<>(); for (CFMetaData cfm : ksm.tablesAndViews()) { ColumnFamilyStore cfs = keyspace.getColumnFamilyStore(cfm.cfName); unload(cfm); if (DatabaseDescriptor.isAutoSnapshot()) cfs.snapshot(snapshotName); Keyspace.open(ksm.name).dropCf(cfm.cfId); droppedCfs.add(cfm.cfId); } // remove the keyspace from the static instances. Keyspace.clear(ksm.name); clearKeyspaceMetadata(ksm); Keyspace.writeOrder.awaitNewBarrier(); // force a new segment in the CL CommitLog.instance.forceRecycleAllSegments(droppedCfs); MigrationManager.instance.notifyDropKeyspace(ksm); }