排查常见问题
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如果您遇到任何问题,请查看以下部分以寻求帮助。
Fleet Engine 中的丢失状态
使用 Fleet Engine 时,请设计您的实现,以预测故障。例如,如果您向 Fleet Engine 发出更新车辆的请求,它可能会返回一条错误,指明相应车辆不存在。然后,您的实现应以新状态重新创建车辆。
在极不可能发生的 Fleet Engine 灾难性故障场景中,您可能需要重新创建大多数车辆和任务,甚至所有车辆和任务。如果创建速率过高,由于有配额检查机制来避免拒绝服务 (DOS) 攻击,因此部分请求可能会因配额问题而再次失败。在这种情况下,请使用退避策略来减慢重新创建速率。
重试
请务必确保您的系统针对向 Fleet Engine 发出的请求实现重试机制,因为这些请求可能会偶尔失败。Fleet Engine 客户端库默认会进行重试。
驾驶员应用中的丢失状态
如果司机应用崩溃,该应用必须在 Driver SDK 中重新创建当前状态。应用应尝试重新创建任务,以确保任务存在并恢复其当前状态。应用还应重新创建并明确设置 Driver SDK 的经停点列表。
注意:这些恢复必须自主完成,不得依赖 Fleet Engine 中的信息,但指示实体是否已存在于数据库中的错误除外。如果实体已存在,则可以吸收该错误,并使用实体的 ID 更新实体。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-31。
[null,null,["最后更新时间 (UTC):2025-08-31。"],[[["\u003cp\u003eFleet Engine implementations should be designed to handle failures and potential data loss by recreating vehicles and tasks when necessary.\u003c/p\u003e\n"],["\u003cp\u003eIn case of Fleet Engine failures, use a backoff strategy to manage the recreation rate and avoid quota issues.\u003c/p\u003e\n"],["\u003cp\u003eImplement retries for Fleet Engine requests to address occasional failures, leveraging client library defaults or custom mechanisms.\u003c/p\u003e\n"],["\u003cp\u003eDriver apps should autonomously restore state after crashes by recreating tasks and stops within the Driver SDK, relying on error handling for existing entities.\u003c/p\u003e\n"]]],["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"],null,["# Troubleshoot common issues\n\nCheck the following sections for help if you experience any issues.\n\nLost state in Fleet Engine\n--------------------------\n\nWhen working with Fleet Engine, design your implementation to anticipate\nfailures. For example, if you issue a request to Fleet Engine to update a\nvehicle, it might respond with an error indicating that the vehicle does not\nexist. Your implementation should then recreate the vehicle in the new state.\n\nIn the extremely unlikely scenario of a catastrophic failure of Fleet Engine,\nyou may need to recreate most or all vehicles and tasks. If the creation rate\nbecomes too high, some requests may fail again due to quota issues since quota\nchecks are in place to avoid denial of service (DOS) attacks. In this case, slow\ndown the recreation rate using a backoff strategy for reattempts.\n\n### Retries\n\nBe sure your system implements retries for requests to Fleet Engine since they\nmight fail occasionally. Fleet Engine client libraries issue retries by default.\n\nLost state in the driver app\n----------------------------\n\nIf the driver app crashes, the app must recreate the current state within the\nDriver SDK. The app should attempt to recreate tasks to ensure that they exist\nand to restore their current states. The app should also recreate and explicitly\nset the list of stops for the Driver SDK.\n\n**Note**: These restorations must be done autonomously without relying on\ninformation from Fleet Engine, other than errors indicating if and when an\nentity already exists in the database. If an entity does already exist, then\nthat error can be absorbed and the entity can be updated using its ID."]]