Repository navigation
docs(external-datasources): a borrowed-credential connect failure recovers without a restart - #31331
Merged
Merged
Conversation
…thout a restart A plugin-driver datasource whose connector instance could not lend at connect is recorded failed, but the driver stays registered and borrows again on each request. The first borrow the lender grants for that instance retracts the failure (DatasourceConnectionService.retractOnLend), so the datasource reads ok again with no restart. The guide only said the connect fails. - external-datasources §4: a "Recovery without a restart" rule under "Fail-closed at connect": when it applies, that only a grant for the same instance clears it, that a lender without onLent (or none) leaves it until a restart, and that the DEGRADED BOOT banner says which. - external-datasources §3: the OS_ALLOW_DRIVER_CONNECT_FAILURE callout names this as the one exception to "until the server is restarted". - odata-datasources: the existing pointer to §4 now says it covers the recovery too, instead of restating it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2fHTwitn43z5tu7gTt
Contributor
Author
|
epic:#27261#1 · marchtian · session_017ihL2c5z3q4h8inrn5kwqV 维护者速读
席位意见:ACCEPT。无契约面: 席位核对
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by 田騏 · project thread
Fixes #31325
Clause-②: no
Metadata-protocol: none
维护者速读
external-datasources.mdx§4「借用连接器凭据」在 "Fail-closed at connect" 下面加一条 "Recovery without a restart":插件驱动的数据源开机借不到连接器实例的凭据会记为失败,实例修好后,下一个请求借用成功就自动撤销失败,不用重启。§3 的OS_ALLOW_DRIVER_CONNECT_FAILURE提示里补一句「这是唯一的例外」;odata-datasources.mdx原有的指向 §4 的链接说明里加上「也讲了怎么恢复」,不重复规则。DatasourceConnectionService.retractOnLend),指南只写了连接失败,没写会自动恢复。content/docs/data-modeling/external-datasources.mdx新加的 "Recovery without a restart" 一条。What changes
packages/services/service-datasource/src/datasource-connection-service.tsat origin/main 604a2b3:attemptConnectrecordsfailed-credentialswithout evicting the driver, and driver-odata drops a refused borrow and borrows again on the next request (packages/drivers/driver-odata/src/plugin.ts).OS_ALLOW_DRIVER_CONNECT_FAILUREis set):handleFailurethrows in the other cases, so there is no process to recover.errorin Setup and503until the repair:failed-credentialsmaps to availabilityfailed; a refused borrow on a read is answered503(the odata guide's fail-closed rule).ok:retractOnLendre-recordsalready-registered(availabilityavailable), which clears the engine's unavailable mark throughrecordState.retractOnLendskips entries whoseconnectordiffers.attemptConnectanddisconnectdrop theawaitingLendentry, andretractOnLendalso checks the retained state is still the recorded verdict and the driver is still registered.onLent), which@objectstack/service-automation's source does (announceLentinborrow); otherwisesubscribeToLendsanswers false and the verdict stands until a restart.DEGRADED BOOTbanner says which: therecoverysentence names the instance when retractable, else the default "until it is reachable AND the server is restarted".OS_ALLOW_DRIVER_CONNECT_FAILUREcallout: its "nothing re-runs the connect ... until the server is restarted" now names this case as the one exception and links to §4.Why
#27990 made the retraction, and the guide still described a borrowed-credential connect failure as lasting for the process. A reader who repairs the connector instance had no way to know a restart is not needed, or when it still is.
Verification
node scripts/check-doc-authoring.mjs: exit 0.node scripts/check-doc-anchors.mjs: exit 0, 945 internal fragment links resolve (the two new links included).datasource-connector-credential.test.ts(the retraction and banner cases).Acceptance notes
claude/project-thread-9xq009, not a separateobjectstack-issue-31325worktree: no other agent shares this container.Human Minimum
packages/specholds no runtime logic. (not touched)pnpm lintpasses. (docs only)main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed. (not touched)content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_017ihL2fHTwitn43z5tu7gTt