Package org.voltdb.exceptions

Examples of org.voltdb.exceptions.MispredictionException


                                      partitions,
                                      this.touched_partitions,
                                      this.args);
        assertNotNull(plan);
        assertTrue(plan.hasMisprediction());
        MispredictionException error = plan.getMisprediction();
        assertTrue(error.getPartitions().values().containsAll(catalogContext.getAllPartitionIds()));
    }
View Full Code Here


        // Create the MispredictException if any Statement in the loop above hit
        // it. We don't want to throw it because whoever called us may want to look
        // at the plan first
        if (mispredict_h != null) {
            plan.mispredict = new MispredictionException(txn_id, mispredict_h);
            if (debug.val)
                LOG.warn(String.format("Created %s for txn #%d\n%s",
                         plan.mispredict.getClass().getSimpleName(), txn_id,
                         plan.mispredict.getPartitions()));
        }
View Full Code Here

       
        // -------------------------------
        // MISPREDICTION
        // -------------------------------
        if (status == Status.ABORT_MISPREDICT && orig_error instanceof MispredictionException) {
            MispredictionException ex = (MispredictionException)orig_error;
            Collection<Integer> partitions = ex.getPartitions().values();
            assert(partitions.isEmpty() == false) :
                "Unexpected empty MispredictionException PartitionSet for " + orig_ts;

            if (predict_touchedPartitions.containsAll(partitions) == false) {
                if (malloc == false) {
View Full Code Here

        }

        // Check whether our plan was caused a mispredict
        // Doing it this way allows us to update the TransactionEstimator before we abort the txn
        if (plan.getMisprediction() != null) {
            MispredictionException ex = plan.getMisprediction();
            ts.setPendingError(ex, false);
            assert(ex.getPartitions().isEmpty() == false) :
                "Unexpected empty PartitionSet for mispredicated txn " + ts;

            // Print Misprediction Debug
            if (hstore_conf.site.exec_mispredict_crash) {
                // Use a lock so that only dump out the first txn that fails
View Full Code Here

        if (need_restart) {
            if (trace.val)
                LOG.trace(String.format("Aborting %s because it was mispredicted", ts));
            // This is kind of screwy because we don't actually want to send the touched partitions
            // histogram because VoltProcedure will just do it for us...
            throw new MispredictionException(txn_id, null);
        }

        // Stick on the ParameterSets that each site needs into the TransactionWorkRequest
        for (int target_site = 0; target_site < tmp_transactionRequestBuilders.length; target_site++) {
            TransactionWorkRequestBuilder builder = tmp_transactionRequestBuilders[target_site];
View Full Code Here

                                          spec_ts, ts, this.partitionId));
                            shouldCommit = true;
                        }
                        if (useAfterQueue == false || shouldCommit == false) {
                            ClientResponseImpl spec_cr = spec_ts.getClientResponse();
                            MispredictionException error = new MispredictionException(spec_ts.getTransactionId(),
                                                                                      spec_ts.getTouchedPartitions());
                            spec_ts.setPendingError(error, false);
                            spec_cr.setStatus(Status.ABORT_SPECULATIVE);
                            (useAfterQueue ? toAbortAfter : toAbortBefore).add(spec_ts);
                        } else {
View Full Code Here

        // data on. This will help speed up concurrent bulk loading
        if (mispredict) {
            if (debug.val)
                LOG.warn(String.format("%s - Restarting as a distributed transaction on partitions %s",
                         ts, ts.getTouchedPartitions().values()));
            throw new MispredictionException(ts.getTransactionId(), ts.getTouchedPartitions());
        }
        StringBuilder sb = null;
        if (trace.val) {
            sb = new StringBuilder();
            sb.append("LoadMultipartition Info for ").append(catalog_tbl.getName()).append(":");
View Full Code Here

        // if tableName is replicated, just send table everywhere.
        if (catalog_tbl.getIsreplicated()) {
            // If they haven't locked all of the partitions in the cluster, then we'll
            // stop them right here and force them to get those
            if (ts.getPredictTouchedPartitions().size() != this.allPartitionsHistogram.getValueCount()) {
                throw new MispredictionException(this.getTransactionId(), this.allPartitionsHistogram);
            }
            pfs = this.createReplicatedPlan(ts, catalog_tbl, table);
        }
        // Otherwise, create a VoltTable for each partition and split up the incoming table
        // then send those partial tables to the appropriate sites.
View Full Code Here

TOP

Related Classes of org.voltdb.exceptions.MispredictionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.