排解常見問題
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
如果遇到任何問題,請參閱下列各節。
Fleet Engine 中的「遺失」狀態
使用 Fleet Engine 時,請設計實作方式,預先防範失敗情況。舉例來說,如果您向 Fleet Engine 發出更新車輛的要求,系統可能會傳回錯誤,指出車輛不存在。然後實作項目應在新狀態中重新建立車輛。
在極不可能發生的 Fleet Engine 災難性故障情況下,您可能需要重新建立大部分或所有車輛和工作。如果建立率過高,由於系統會進行配額檢查,避免阻斷服務 (DOS) 攻擊,因此部分要求可能會因配額問題而再次失敗。在這種情況下,請使用重試的輪詢策略,降低重新建立的速率。
重試
請務必為 Fleet Engine 的要求實作重試機制,因為要求偶爾可能會失敗。Fleet Engine 用戶端程式庫預設會重試。
駕駛應用程式中的狀態遺失
如果駕駛人應用程式當機,應用程式必須在 Driver SDK 中重新建立目前狀態。應用程式應嘗試重新建立工作,確保工作存在並還原目前狀態。應用程式也應重新建立並明確設定 Driver SDK 的停靠站清單。
注意:這些還原作業必須自主完成,不得依賴 Fleet Engine 的資訊,但可參考錯誤訊息,瞭解實體是否已存在資料庫中。如果實體已存在,則可吸收該錯誤,並使用實體 ID 更新實體。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-16 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-16 (世界標準時間)。"],[[["Fleet Engine implementations should be designed to handle failures and potential data loss by recreating vehicles and tasks when necessary."],["In case of Fleet Engine failures, use a backoff strategy to manage the recreation rate and avoid quota issues."],["Implement retries for Fleet Engine requests to address occasional failures, leveraging client library defaults or custom mechanisms."],["Driver apps should autonomously restore state after crashes by recreating tasks and stops within the Driver SDK, relying on error handling for existing entities."]]],["Implement error handling for Fleet Engine failures, such as vehicle non-existence, by recreating entities. In catastrophic failures, recreate vehicles and tasks, using a backoff strategy if quota issues arise. Implement request retries, as provided by Fleet Engine client libraries. If the driver app crashes, autonomously recreate tasks and stop lists within the Driver SDK, relying only on Fleet Engine errors to determine if entities already exist for update purposes.\n"]]