并发注意事项
您不应同时使用 Play 管理中心和 Publishing API 来更新应用,这样做可能会产生意外副作用。
下面列出了一些示例场景,旨在说明如果您选择同时使用 Play 管理中心和 Publishing API 来更新应用,或使用多个并发 Publishing API 客户端,会出现哪些预期行为。
在 Play 管理中心内有更改可送审时提交编辑会话
提交编辑会话会使系统将所有更改送审,其中包括 Play 管理中心内已可送审的更改。例如,假设您在 Play 管理中心内已有可送审的更改。如果您使用 API 创建并修改了一个编辑会话,然后将其提交,则该提交操作会将所有更改送审,其中包括通过 Play 管理中心做出的更改。
在 Play 管理中心做出更改会让进行中的编辑会话失效
如果您使用 API 让某个编辑会话处于进行中,然后又通过 Play 管理中心更新相应应用,则该编辑会话将失效。您需要创建新的编辑会话才能通过 API 更新该应用。
如果用户为应用创建了新的编辑会话,则该用户对同一应用创建的所有进行中的编辑会话都将失效
如果用户为应用创建了新的编辑会话,则该用户对同一应用创建的所有进行中的编辑会话都会失效。每位 API 用户对每个应用只能有一个进行中的编辑会话。
对于同一应用,多位用户都可以有进行中的编辑会话
如果有两位用户针对同一应用创建了编辑会话,那么这两位用户的编辑会话对双方而言都属于进行中的编辑会话,直到其中一个编辑会话被提交。先提交的编辑会话会使该应用的所有其他编辑会话失效。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-02-27。
[null,null,["最后更新时间 (UTC):2025-02-27。"],[[["Avoid using the Developer Console and the Publishing API simultaneously for application updates due to potential conflicts and unexpected outcomes."],["Concurrent edits, whether through the Developer Console or multiple Publishing API clients, can lead to one edit overriding others, requiring careful management of updates."],["Initiating a commit action using the API will send all pending changes for review, including those staged in the Developer Console."],["Making changes in the Developer Console while an API edit is active will invalidate the API edit, necessitating a new edit for API-based updates."],["Only one active edit per application is allowed per API user; creating a new edit invalidates any existing active edits by the same user for that application."]]],["Using the Developer Console and Publishing API simultaneously can cause issues. Committing an API edit sends all changes for review, even those made in the Developer Console. Developer Console changes invalidate active API edits, requiring a new edit to be made. A new edit from one user invalidates their other active edits. Multiple users can have active edits, but the first commit invalidates the others. Concurrent use of these methods can result in unintended changes being published.\n"]]