Exemplo n.º 1
0
void QUnifiedTimer::restart()
{
    insideRestart = true;
    for (int i = 0; i < animationTimers.count(); ++i)
        animationTimers.at(i)->restartAnimationTimer();
    insideRestart = false;

    localRestart();
}
Exemplo n.º 2
0
void QUnifiedTimer::startTimers()
{
    startTimersPending = false;
    if (!animationTimers.isEmpty())
        updateAnimationTimers(-1);

    //we transfer the waiting animations into the "really running" state
    animationTimers += animationTimersToStart;
    animationTimersToStart.clear();
    if (!animationTimers.isEmpty()) {
        localRestart();
        if (!time.isValid()) {
            lastTick = 0;
            time.start();
        }
    }
}
Exemplo n.º 3
0
void QUnifiedTimer::startTimers()
{
    startTimersPending = false;

    //we transfer the waiting animations into the "really running" state
    animationTimers += animationTimersToStart;
    animationTimersToStart.clear();
    if (!animationTimers.isEmpty()) {
        if (!time.isValid()) {
            lastTick = 0;
            time.start();
            temporalDrift = 0;
            driverStartTime = 0;
        }
        localRestart();
    }
}
Exemplo n.º 4
0
    void
    test_after_tlog(bool failover)
    {
        const auto wrns(make_random_namespace());

        SharedVolumePtr v = make_volume(*wrns);

        const std::string pattern1("Hairdresser On Fire");

        {
            SCOPED_BLOCK_BACKEND(*v);

            writeToVolume(*v,
                          v->getClusterMultiplier() * CachePage::capacity(),
                          v->getClusterSize(),
                          pattern1);
        }

        v->scheduleBackendSync();
        waitForThisBackendWrite(*v);

        const std::string pattern2("Such A Little Thing Makes Such A Big Difference");

        writeToVolume(*v,
                      2 * v->getClusterMultiplier() * CachePage::capacity(),
                      v->getClusterSize(),
                      pattern2);

        const auto ncfgs(node_configs());

        if (failover)
        {
            mds_manager_->stop_one(ncfgs[0]);

            checkVolume(*v,
                        0,
                        v->getClusterSize(),
                        "");
        }
        else
        {
            const std::vector<MDSNodeConfig> ncfgs2{ ncfgs[1],
                                                     ncfgs[0] };

            v->updateMetaDataBackendConfig(MDSMetaDataBackendConfig(ncfgs2,
                                                                    ApplyRelocationsToSlaves::T));
        }

        check_config(*v,
                     ncfgs,
                     true);

        checkVolume(*v,
                    v->getClusterMultiplier() * CachePage::capacity(),
                    v->getClusterSize(),
                    pattern1);

        checkVolume(*v,
                    2 * v->getClusterMultiplier() * CachePage::capacity(),
                    v->getClusterSize(),
                    pattern2);

        destroyVolume(v,
                      DeleteLocalData::F,
                      RemoveVolumeCompletely::F);

        v = localRestart(wrns->ns());

        check_config(*v,
                     ncfgs,
                     true);

        checkVolume(*v,
                    v->getClusterMultiplier() * CachePage::capacity(),
                    v->getClusterSize(),
                    pattern1);

        checkVolume(*v,
                    2 * v->getClusterMultiplier() * CachePage::capacity(),
                    v->getClusterSize(),
                    pattern2);
    }
Exemplo n.º 5
0
    void
    test_before_tlog(bool failover)
    {
        const auto wrns(make_random_namespace());

        SharedVolumePtr v = make_volume(*wrns);

        const auto ncfgs(node_configs());
        const std::string pattern("King Leer");

        {
            SCOPED_BLOCK_BACKEND(*v);

            writeToVolume(*v,
                          v->getClusterMultiplier() * CachePage::capacity(),
                          v->getClusterSize(),
                          pattern);

            if (failover)
            {
                mds_manager_->stop_one(ncfgs[0]);

                checkVolume(*v,
                            0,
                            v->getClusterSize(),
                            "");
            }
            else
            {
                const std::vector<MDSNodeConfig> ncfgs2{ ncfgs[1],
                                                         ncfgs[0] };

                v->updateMetaDataBackendConfig(MDSMetaDataBackendConfig(ncfgs2,
                                                                        ApplyRelocationsToSlaves::T));
            }

            check_config(*v,
                         ncfgs,
                         true);

            checkVolume(*v,
                        v->getClusterMultiplier() * CachePage::capacity(),
                        v->getClusterSize(),
                        pattern);
        }

        destroyVolume(v,
                      DeleteLocalData::F,
                      RemoveVolumeCompletely::F);

        v = localRestart(wrns->ns());

        check_config(*v,
                     ncfgs,
                     true);

        checkVolume(*v,
                    v->getClusterMultiplier() * CachePage::capacity(),
                    v->getClusterSize(),
                    pattern);
    }