Repository navigation
Zeta 后端:Livy 归档不回填 appId(归档竞态导致已完成作业永远不出现 Spark UI 按钮) - #272
Open
todosdev[bot] wants to merge 2 commits into
Open
todosdev[bot] wants to merge 2 commits into
todosdev[bot] wants to merge 2 commits into
Conversation
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.
Summary
app_id不再永久缺失,列表渲染的「Spark UI」按钮可正常出现。Changes
worker/src/routes/livy.tsarchiveDriverLog:在首次from=0拉取日志后、尾部重拉重赋值lines之前,用extractAppIdFromDriverLog(data.log)从日志头部提取 appId;归档UPDATE增加app_id = COALESCE(app_id, ?5),与log_body同一次落库回填。COALESCE保证解析不到 appId 时不刷 NULL、运行期已回填的值不被覆盖。GET /:id/livy/batches/:batchId/log归档分支:SELECT增加app_id;对已归档但app_id为 NULL 的行,从log_body解析并带AND app_id IS NULL守卫补回填(修复历史坏行)。worker/src/routes/__tests__/livy.test.tsTesting
cd worker && pnpm type-check通过;pnpm vitest run src/routes/__tests__/livy.test.ts56/56 通过;pnpm format:check通过(仅 biome schema 2.6.7→2.6.8 的既有提示)。workflow_dispatch,ref=tds/conv-01a22b48-2f87-72f2-8594-1a12c92007e2 @ dd67023):run 46373353254,conclusionsuccess(全绿)。已知边界(不处理):历史大日志(超 512KB / 10000 行)坏行,其 app-id 行已被
truncateLogTail尾部截断裁掉,无法经读取分支补回;仅影响修复前已落库的大日志,不影响本修复主目标。