update failed or we didn't execute an update.
506520
private boolean deleteBatch(List<String> objIDs) {
        if (objIDs.size() == 0) {
            return false;
        }
        m_logger.debug("Deleting batch of {} objects from {}", objIDs.size(), m_tableDef.getTableName());
        BatchObjectUpdater batchUpdater = new BatchObjectUpdater(m_tableDef);
        BatchResult batchResult = batchUpdater.deleteBatch(objIDs);
        if (batchResult.isFailed()) {
            m_logger.error("Batch query failed: {}", batchResult.getErrorMessage());
            return false;
        }
        return true;
    }
1151707
def do_update(pool,request,models):
  ""
  return {k:fkapply(models,pool,process_update,missing_update,k,v) for k,v in request.items()}
512247
function check_for_update() {
		$update_data = get_transient( $this->product_key );

		if ( false === $update_data ) {
			$failed      = false;
			$update_data = $this->get_version_data();
			if ( empty( $update_data ) ) {
				$failed = true;
			}
			// If the response failed, try again in 30 minutes.
			if ( $failed ) {
				$data              = new \stdClass();
				$data->new_version = $this->product->get_version();
				set_transient( $this->product_key, $data, 30 * MINUTE_IN_SECONDS );

				return false;
			}
			$update_data->sections = maybe_unserialize( $update_data->sections );

			set_transient( $this->product_key, $update_data, 12 * HOUR_IN_SECONDS );
		}
		if ( ! isset( $update_data->new_version ) ) {
			return false;
		}
		if ( version_compare( $this->product->get_version(), $update_data->new_version, '>=' ) ) {
			return false;
		}

		return (array) $update_data;
	}
651430
def update_status(self):
        
        task = self.make_request(
            TaskRunFailed,
            href=self.href)

        return Task(task)
105275
public function executeUpdate()
	{
		
		try {

			$result = $this->connection->execute($this->query_string);

			if ($result === false) throw new MySQLException(get_class(new MySQLException)." There was an error in the query: {$this->connection->lastError()} <span class=\"query-string\">".$this->query_string."</span>");

			return true;
				
		}
		 catch (MySQLException $e) {
			
			$e->errorShow();	
		}	
	}
1283109
void one_more_poll() throws DevFailed {
	if (works.size() > 0) {
	    final WorkItem item = (WorkItem) works.elementAt(0);
	    works.remove(0);

	    if (polling_stop == false) {
		if (item.type == Tango_POLL_CMD) {
		    poll_cmd(item);
		} else {
		    poll_attr(item);
		}
	    }
	    item.wake_up_date = compute_new_date(item.wake_up_date, item.update);
	    insert_in_list(item);
	}
    }
460288
@Override
    public void run() {
        try {
            GrayUpgradeConfig grayUpgradeConf = (GrayUpgradeConfig) stormClusterState.get_gray_upgrade_conf(topologyId);

            // no upgrade request
            if (grayUpgradeConf == null) {
                LOG.debug("gray upgrade conf is null, skip...");
                return;
            }

            if (grayUpgradeConf.isCompleted() && !grayUpgradeConf.isRollback()) {
                LOG.debug("detected a complete upgrade, skip...");
                return;
            }

            if (grayUpgradeConf.isExpired() && !grayUpgradeConf.isRollback()) {
                LOG.info("detected an expired upgrade, completing...");
                // todo: should we check all task status?
                GrayUpgradeConfig.completeUpgrade(grayUpgradeConf);
                //stormClusterState.remove_gray_upgrade_info(topologyId);
                stormClusterState.set_gray_upgrade_conf(topologyId, grayUpgradeConf);
                stormClusterState.update_storm(topologyId, new StormStatus(StatusType.active));
                return;
            }

            // first time, set workers
            if (this.totalWorkers.size() == 0) {
                setTotalWorkers(tmContext);
            }

            // notify current upgrading workers to upgrade (again)
            Set<String> upgradingWorkers = Sets.newHashSet(stormClusterState.get_upgrading_workers(topologyId));
            if (upgradingWorkers.size() > 0) {
                LOG.info("Following workers are under upgrade:{}", upgradingWorkers);
                for (String worker : upgradingWorkers) {
                    notifyToUpgrade(worker);
                }
                return;
            }

            Set<String> upgradedWorkers = Sets.newHashSet(stormClusterState.get_upgraded_workers(topologyId));
            if (grayUpgradeConf.isRollback()) {
                LOG.info("Rollback has completed, removing upgrade info in zk and updating storm status...");
                // there's no way back after a rollback
                stormClusterState.remove_gray_upgrade_info(topologyId);
                stormClusterState.update_storm(topologyId, new StormStatus(StatusType.active));
                return;
            }

            if (isUpgradeCompleted(upgradedWorkers, totalWorkers)) {
                LOG.info("This upgraded has finished! Marking upgrade config as completed...");
                GrayUpgradeConfig.completeUpgrade(grayUpgradeConf);
                stormClusterState.set_gray_upgrade_conf(topologyId, grayUpgradeConf);
                //stormClusterState.remove_gray_upgrade_info(topologyId);
                stormClusterState.update_storm(topologyId, new StormStatus(StatusType.active));
                return;
            }

            // assign next batch of workers
            if (grayUpgradeConf.continueUpgrading()) {
                pickWorkersToUpgrade(grayUpgradeConf, upgradedWorkers);
            }

            // pause upgrading
            grayUpgradeConf.setContinueUpgrade(false);
            stormClusterState.set_gray_upgrade_conf(topologyId, grayUpgradeConf);
        } catch (Exception ex) {
            LOG.error("Failed to get upgrade config from zk, will abort this upgrade...", ex);
            recover();
        }
    }
1125498
protected void performUpdate() {

        // Wrap a try-catch around everything, because an escaping exception would cancel the task from which this is called
        List<CmsWaitHandle> waitHandles = new ArrayList<>();
        try {
            ArrayList<Object> work = new ArrayList<>();
            m_workQueue.drainTo(work);
            Set<CmsUUID> updateIds = new HashSet<CmsUUID>();

            for (Object item : work) {
                if (item instanceof CmsUUID) {
                    updateIds.add((CmsUUID)item);
                } else if (item instanceof CmsWaitHandle) {
                    waitHandles.add((CmsWaitHandle)item);
                }
            }
            CmsADEConfigCacheState oldState = m_state;
            if (!updateIds.isEmpty() || (oldState == null)) {
                try {
                    // Although  the updates are performed in a scheduled task, it is still possible
                    // that the task is scheduled immediately after a configuration update event. So
                    // here we ensure that there is at least a small delay between the event and the
                    // actual update. This is required to prevent problems with other caches.
                    Thread.sleep(100);
                } catch (InterruptedException e) {
                    // ignore
                }
                if (updateIds.contains(ID_UPDATE_ALL) || (oldState == null)) {
                    m_state = readCompleteConfiguration();
                } else {
                    boolean updateModules = updateIds.remove(ID_UPDATE_MODULES);
                    boolean updateElementViews = updateIds.remove(ID_UPDATE_ELEMENT_VIEWS);
                    updateIds.remove(ID_UPDATE_FOLDERTYPES); // folder types are always updated when the update set is not empty, so at this point we don't care whether the id for folder type updates actually is in the update set
                    Map<CmsUUID, CmsADEConfigDataInternal> updateMap = Maps.newHashMap();
                    for (CmsUUID structureId : updateIds) {
                        CmsADEConfigDataInternal sitemapConfig = parseSitemapConfiguration(structureId);
                        // sitemapConfig may be null at this point
                        updateMap.put(structureId, sitemapConfig);
                    }
                    List<CmsADEConfigDataInternal> moduleConfigs = null;
                    if (updateModules) {
                        moduleConfigs = loadModuleConfiguration();
                    }
                    Map<CmsUUID, CmsElementView> elementViews = null;
                    if (updateElementViews) {
                        elementViews = loadElementViews();
                    }
                    m_state = oldState.createUpdatedCopy(updateMap, moduleConfigs, elementViews);
                }
            }

        } catch (Exception e) {
            LOG.error("Could not perform configuration cache update: " + e.getMessage(), e);
        } finally {
            for (CmsWaitHandle handle : waitHandles) {
                handle.release();
            }
        }
    }
197001
protected void handleInstallRequestFailure(MemberState member, InstallRequest request, Throwable error) {
    // Log the failed attempt to contact the member.
    failAttempt(member, error);
  }
708831
def has_conflicting_update(self, update):
        
        # we explicitly want a flat list of updates here, that's why we call iter_updates
        # with both `initial` and `scheduled` == False
        for _, _, _, updates in self.iter_updates(initial=False, scheduled=False):
            for _update in updates:
                if (
                        update.requirement.key == _update.requirement.key and
                        (
                                update.commit_message != _update.commit_message or
                                update.requirement.latest_version_within_specs !=
                                _update.requirement.latest_version_within_specs
                        )
                ):
                    logger.info("{} conflicting with {}/{}".format(
                        update.requirement.key,
                        update.requirement.latest_version_within_specs,
                        _update.requirement.latest_version_within_specs)
                    )
                    return True
        return False
218514
private void updateDOTable() throws InstallationFailedException {
        if (_db.equals(InstallOptions.INCLUDED)) {
            return; // no need to update embedded
        }
        try {
            Connection conn = getConnection();
            DatabaseMetaData dmd = conn.getMetaData();
            ResultSet rs = dmd.getTables(null, null, "do%", null);
            while (rs.next()) {
                if (rs.getString("TABLE_NAME").equals("do")) {
                    Statement stmt = conn.createStatement();
                    stmt.execute("ALTER TABLE do RENAME TO dobj");
                    System.out.println("Renamed table 'do' to 'dobj'.");
                    stmt.close();
                }
            }
            rs.close();
        } catch (Exception e) {
            throw new InstallationFailedException(e.getMessage(), e);
        }
    }
1018156
public void updateReplicasFromMigrationLeaderFailedHost(int failedHostId) {
        List<Long> replicas = new ArrayList<>();
        for (long hsid : m_replicaHSIds) {
            if (failedHostId != CoreUtils.getHostIdFromHSId(hsid)) {
                replicas.add(hsid);
            }
        }
        ((InitiatorMailbox)m_mailbox).updateReplicas(replicas, null);
    }
903484
private void updateFailure(DownloadRequest request, int statusCode, String errMsg) {
    updateState(request, DownloadState.FAILURE);

    /* if the status code is 0, may be cause by the net error */
    int leftRetryTime = request.retryTime();
    if (leftRetryTime >= 0) {
      try {
        /* sleep a while before retrying */
        sleep(request.retryInterval());
      } catch (InterruptedException e) {
        /* we may have been interrupted because it was time to quit */
        if (quit) {
          request.finish();
          return;
        }
      }

      /* retry downloading */
      if (!request.isCanceled()) {
        logger.log("Retry DownloadRequest: "
            + request.downloadId()
            + " left retry time: "
            + leftRetryTime);
        updateRetry(request);
        executeDownload(request);
      }

      return;
    }

    /* notify the request that downloading has finished */
    request.finish();

    /* deliver failure message */
    delivery.postFailure(request, statusCode, errMsg);
  }
1342780
function handleUpdateProcess(updates) {
        var handler = _updateProcessHandler || _defaultUpdateProcessHandler;
        var initSuccess = handler(updates);
        if (_updateProcessHandler && !initSuccess) {
            // Give a chance to default handler in case
            // the auot update mechanism has failed.
            _defaultUpdateProcessHandler(updates);
        }
    }
445721
def dispatch_failed(self, context):
        """"""
        traceback.print_exception(
            context.exc_type, context.exc_value, context.traceback)
        raise SystemExit(1)
1118494
function _checkUpdate(){
  var notifier = updateNotifier({
    pkg: pkg,
    updateCheckInterval: 1000 * 60 * 60 * 24 * 7
  })
  if (notifier.update)
    notifier.notify()
}
452262
function fail(err, status=1) {
    console.log(process.env.DEBUG ? err.stack : err.message);
    process.exit(status);
}