test(phase-3): 3D 前置——publish 回传段 golden 落地,27 段流水钉住本支独有的三处形状
只加测试与 golden,`PublishTaskService` 一字未动(现网行为无变更,故不需要行为回归之外的验证)。 钉住的 publish 独有形状(逐段对 golden 复核过,不是推测): - 取锁在取任务**之前**:`lockBusyRejectedBeforeAnyLoad` 只有 `lock.acquire` 一行、没有任何 `task.load`。这与 collectdata 的回传段方向相反,是「同族不同形」的第一处实证。 - SUCCESS 静默短路不抛:`taskSuccessShortCircuitsWithoutThrowing` = 两次 `task.load`(锁外一次、事务内一次)+ `tx.begin/commit`、零写入、`result=void`。底座 `TerminalRejection` 那三种档位里没有这一种。 - 未完成回传时 `job.enqueue resultId=2001 scopeKey=task:1001:owner:node-A`(键形状带 owner,不是纯 `task:<id>`)。 - 同请求重复文件被拒时,**未提交的 chunk 会被清掉**:`duplicateFileInOneRequestRejected` 走出 `chunk.countReferenced -> 0 → payload.delete pointer=rustfs:chunk-1`,`payloadDelete=1` 而 `files` 仍全 PENDING。 口径与坑(都是老坑的新一次踩法): - golden 27 段由 3 支执行用例渲染,第 4 支 `@Test` 是写档器、无 `SHUFU_SNAPSHOT_WRITE` 时 skip ⇒ 执行读数 `Tests run: 4, Skipped: 1`。「段数 ≠ 用例数」第七处坑在此复现,登记以免下一个人拿 27 去对 `@Test` 计数。 - 写档过程中有一记**假 golden**:MyBatis-Plus `AbstractWrapper.getParamNameValuePairs()` 是懒填充,不先调 `getSqlSegment()` 就拿到空 Map ⇒ 分片查询替身对任何条件都返回同一行,`lastChunkCompletesMerge` 那格真跑成了「同一 chunk_index 已回传不同内容」的错路。现以 `boundValues(...)` 统一先取 `getSqlSegment()` 再读绑定值。这类坑不会判红,只会把流水记成假的。 - 清理件在 afterCommit 抛异常被吞、调用方仍见成功:`cleanupFailureAfterCommitIsSwallowedAndCallerStillSeesSuccess` 另证 `chunk` 删失败后**不再**删 scope(现网两删除同在一个 try 里)。 验证:全量 `mvn -o test` → `Tests run: 4537, Failures: 0, Errors: 0, Skipped: 15` + BUILD SUCCESS(rc 取自重定向而非管道);非写档模式复跑本类 4/0/skip 1;ops `ruff check .` = All checks passed、readability ratchet 9 passed(该尺只扫 `src/main`,792 行的测试件不构成新 offender)。
This commit is contained in:
@@ -0,0 +1,358 @@
|
||||
== case=completeSingleChunk
|
||||
result=void
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> -
|
||||
chunk.selectOne idx=1 -> -
|
||||
storage.ensure sharedWrite=true
|
||||
payload.storeChunk idx=1 len=271 hash=514c20b21e0f
|
||||
chunk.selectList size=0 idx=
|
||||
payload.resolve pointer=rustfs:chunk-1 -> len=271 hash=514c20b21e0f
|
||||
tx.begin
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> -
|
||||
chunk.selectOne idx=1 -> -
|
||||
chunk.insert idx=1/1 pointer=rustfs:chunk-1 hash=514c20b21e0fe230bc34f2d44ce54d57c46c0cf804c51e9bfd600a9cf43ae104
|
||||
chunk.selectList size=1 idx=1/1
|
||||
scope.selectOne -> -
|
||||
scope.insert chunkTotal=1 stateJson.len=37 stateJson.hash=ed021c36b95a
|
||||
item.count -> 2
|
||||
item.delete
|
||||
item.insertBatch n=2
|
||||
file.update id=9101 status=SUCCESS totalRows=2 processedRows=2 error=-
|
||||
files.list size=1 id=9101/SUCCESS/total=2/processed=2/err=-
|
||||
result.selectOne -> -
|
||||
result.insert taskId=1001 sourceFilename=PUBLISH-1 rowCount=- success=0 contentType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
task.update id=1001 status=RUNNING successFileCount=1 failedFileCount=0 errorMessage=- finishedAt=-
|
||||
job.enqueue resultId=2001 scopeKey=task:1001:owner:node-A
|
||||
tx.commit
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=1 failedFileCount=0 errorMessage=- files=[id=9101/SUCCESS/total=2/processed=2/err=-] chunks=1 scope=7001 result=2001 jobEnqueue=1 payloadDelete=0
|
||||
== case=partialChunkWaitsForRest
|
||||
result=void
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> -
|
||||
chunk.selectOne idx=1 -> -
|
||||
storage.ensure sharedWrite=true
|
||||
payload.storeChunk idx=1 len=136 hash=4528ed738ff3
|
||||
chunk.selectList size=0 idx=
|
||||
tx.begin
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> -
|
||||
chunk.selectOne idx=1 -> -
|
||||
chunk.insert idx=1/2 pointer=rustfs:chunk-1 hash=4528ed738ff38dd22d57966b149083a6b86f9cecbfc7adc3a82273c149c1d968
|
||||
chunk.selectList size=1 idx=1/2
|
||||
scope.selectOne -> -
|
||||
scope.insert chunkTotal=2 stateJson.len=38 stateJson.hash=22e615ebaa75
|
||||
item.count -> 0
|
||||
file.update id=9101 status=RUNNING totalRows=0 processedRows=1 error=-
|
||||
files.list size=1 id=9101/RUNNING/total=0/processed=1/err=-
|
||||
result.selectOne -> -
|
||||
result.insert taskId=1001 sourceFilename=PUBLISH-1 rowCount=- success=0 contentType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
task.update id=1001 status=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- finishedAt=-
|
||||
tx.commit
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/RUNNING/total=0/processed=1/err=-] chunks=1 scope=7001 result=2001 jobEnqueue=0 payloadDelete=0
|
||||
== case=lastChunkCompletesMerge
|
||||
result=void
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> id=7001 chunkTotal=2 stateJson.len=22 stateJson.hash=505748527ede
|
||||
chunk.selectOne idx=2 -> -
|
||||
storage.ensure sharedWrite=true
|
||||
payload.storeChunk idx=2 len=136 hash=fa72d8e86017
|
||||
chunk.selectList size=1 idx=1/2
|
||||
payload.resolve pointer=rustfs:chunk-1 -> len=32 hash=0b7b26170d13
|
||||
payload.resolve pointer=rustfs:chunk-2 -> len=136 hash=fa72d8e86017
|
||||
tx.begin
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> id=7001 chunkTotal=2 stateJson.len=22 stateJson.hash=505748527ede
|
||||
chunk.selectOne idx=2 -> -
|
||||
chunk.insert idx=2/2 pointer=rustfs:chunk-2 hash=fa72d8e86017a3d74173ce8a5c9d2b83ad7239a39a21e26d4b6effa8f8c2d92c
|
||||
chunk.selectList size=2 idx=1/2,2/2
|
||||
scope.selectOne -> id=7001 chunkTotal=2 stateJson.len=22 stateJson.hash=505748527ede
|
||||
scope.update id=7001 chunkTotal=2 stateJson.len=37 stateJson.hash=ed021c36b95a
|
||||
item.count -> 2
|
||||
item.delete
|
||||
item.insertBatch n=2
|
||||
file.update id=9101 status=SUCCESS totalRows=2 processedRows=2 error=-
|
||||
files.list size=1 id=9101/SUCCESS/total=2/processed=2/err=-
|
||||
result.selectOne -> -
|
||||
result.insert taskId=1001 sourceFilename=PUBLISH-1 rowCount=- success=0 contentType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
task.update id=1001 status=RUNNING successFileCount=1 failedFileCount=0 errorMessage=- finishedAt=-
|
||||
job.enqueue resultId=2001 scopeKey=task:1001:owner:node-A
|
||||
tx.commit
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=1 failedFileCount=0 errorMessage=- files=[id=9101/SUCCESS/total=2/processed=2/err=-] chunks=2 scope=7001 result=2001 jobEnqueue=1 payloadDelete=0
|
||||
== case=errorFileFailsAllSoCleanupRuns
|
||||
result=void
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
tx.begin
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
file.update id=9101 status=FAILED totalRows=0 processedRows=0 error=打开文件失败
|
||||
files.list size=1 id=9101/FAILED/total=0/processed=0/err=打开文件失败
|
||||
result.selectOne -> -
|
||||
result.insert taskId=1001 sourceFilename=PUBLISH-1 rowCount=- success=0 contentType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
task.update id=1001 status=FAILED successFileCount=0 failedFileCount=1 errorMessage=全部文件处理失败 finishedAt=set
|
||||
result.update id=2001 success=0 rowCount=- error=全部文件处理失败
|
||||
tx.commit
|
||||
chunk.selectList size=0 idx=
|
||||
chunk.deleteAll
|
||||
scope.deleteAll
|
||||
counters lockAcquire=1 taskStatus=FAILED successFileCount=0 failedFileCount=1 errorMessage=全部文件处理失败 files=[id=9101/FAILED/total=0/processed=0/err=打开文件失败] chunks=0 scope=- result=2001 jobEnqueue=0 payloadDelete=0
|
||||
== case=fileAlreadySuccessSkipped
|
||||
result=void
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=SUCCESS
|
||||
tx.begin
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=SUCCESS
|
||||
files.list size=1 id=9101/SUCCESS/total=0/processed=0/err=-
|
||||
result.selectOne -> -
|
||||
result.insert taskId=1001 sourceFilename=PUBLISH-1 rowCount=- success=0 contentType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
task.update id=1001 status=RUNNING successFileCount=1 failedFileCount=0 errorMessage=- finishedAt=-
|
||||
job.enqueue resultId=2001 scopeKey=task:1001:owner:node-A
|
||||
tx.commit
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=1 failedFileCount=0 errorMessage=- files=[id=9101/SUCCESS/total=0/processed=0/err=-] chunks=0 scope=- result=2001 jobEnqueue=1 payloadDelete=0
|
||||
== case=taskSuccessShortCircuitsWithoutThrowing
|
||||
result=void
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=SUCCESS module=PUBLISH userId=7
|
||||
tx.begin
|
||||
task.load id=1001 status=SUCCESS module=PUBLISH userId=7
|
||||
tx.commit
|
||||
counters lockAcquire=1 taskStatus=SUCCESS successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=0
|
||||
== case=taskFailedRejectedBeforeLockWork
|
||||
throw=BusinessException msg=任务已失败,拒绝继续回传
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=FAILED module=PUBLISH userId=7
|
||||
counters lockAcquire=1 taskStatus=FAILED successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=0
|
||||
== case=pendingFlipsToRunningOnFirstChunk
|
||||
result=void
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=PENDING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> -
|
||||
chunk.selectOne idx=1 -> -
|
||||
storage.ensure sharedWrite=true
|
||||
payload.storeChunk idx=1 len=136 hash=4528ed738ff3
|
||||
chunk.selectList size=0 idx=
|
||||
payload.resolve pointer=rustfs:chunk-1 -> len=136 hash=4528ed738ff3
|
||||
tx.begin
|
||||
task.load id=1001 status=PENDING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> -
|
||||
chunk.selectOne idx=1 -> -
|
||||
chunk.insert idx=1/1 pointer=rustfs:chunk-1 hash=4528ed738ff38dd22d57966b149083a6b86f9cecbfc7adc3a82273c149c1d968
|
||||
chunk.selectList size=1 idx=1/1
|
||||
scope.selectOne -> -
|
||||
scope.insert chunkTotal=1 stateJson.len=37 stateJson.hash=bfb9a54b7c1d
|
||||
item.count -> 1
|
||||
item.delete
|
||||
item.insertBatch n=1
|
||||
file.update id=9101 status=SUCCESS totalRows=1 processedRows=1 error=-
|
||||
files.list size=1 id=9101/SUCCESS/total=1/processed=1/err=-
|
||||
result.selectOne -> -
|
||||
result.insert taskId=1001 sourceFilename=PUBLISH-1 rowCount=- success=0 contentType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
task.update id=1001 status=RUNNING successFileCount=1 failedFileCount=0 errorMessage=- finishedAt=-
|
||||
job.enqueue resultId=2001 scopeKey=task:1001:owner:node-A
|
||||
tx.commit
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=1 failedFileCount=0 errorMessage=- files=[id=9101/SUCCESS/total=1/processed=1/err=-] chunks=1 scope=7001 result=2001 jobEnqueue=1 payloadDelete=0
|
||||
== case=taskNotFoundAfterLock
|
||||
throw=BusinessException msg=任务不存在
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=- module=- userId=-
|
||||
counters lockAcquire=1 taskStatus=- successFileCount=- failedFileCount=- errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=0
|
||||
== case=illegalTaskIdRejectedAfterLock
|
||||
throw=BusinessException msg=任务不存在
|
||||
lock.acquire taskId=1000
|
||||
task.load id=1000 status=- module=- userId=-
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=0
|
||||
== case=wrongModuleTypeRejectedAsNotFound
|
||||
throw=BusinessException msg=任务不存在
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=COLLECT_DATA userId=7
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=0
|
||||
== case=userIdMismatchRejectedAsNotFound
|
||||
throw=BusinessException msg=任务不存在
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=0
|
||||
== case=nullUserIdSkipsOwnershipCheck
|
||||
result=void
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> -
|
||||
chunk.selectOne idx=1 -> -
|
||||
storage.ensure sharedWrite=true
|
||||
payload.storeChunk idx=1 len=136 hash=4528ed738ff3
|
||||
chunk.selectList size=0 idx=
|
||||
payload.resolve pointer=rustfs:chunk-1 -> len=136 hash=4528ed738ff3
|
||||
tx.begin
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> -
|
||||
chunk.selectOne idx=1 -> -
|
||||
chunk.insert idx=1/1 pointer=rustfs:chunk-1 hash=4528ed738ff38dd22d57966b149083a6b86f9cecbfc7adc3a82273c149c1d968
|
||||
chunk.selectList size=1 idx=1/1
|
||||
scope.selectOne -> -
|
||||
scope.insert chunkTotal=1 stateJson.len=37 stateJson.hash=bfb9a54b7c1d
|
||||
item.count -> 1
|
||||
item.delete
|
||||
item.insertBatch n=1
|
||||
file.update id=9101 status=SUCCESS totalRows=1 processedRows=1 error=-
|
||||
files.list size=1 id=9101/SUCCESS/total=1/processed=1/err=-
|
||||
result.selectOne -> -
|
||||
result.insert taskId=1001 sourceFilename=PUBLISH-1 rowCount=- success=0 contentType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
task.update id=1001 status=RUNNING successFileCount=1 failedFileCount=0 errorMessage=- finishedAt=-
|
||||
job.enqueue resultId=2001 scopeKey=task:1001:owner:node-A
|
||||
tx.commit
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=1 failedFileCount=0 errorMessage=- files=[id=9101/SUCCESS/total=1/processed=1/err=-] chunks=1 scope=7001 result=2001 jobEnqueue=1 payloadDelete=0
|
||||
== case=illegalUserIdRejectedBeforeLock
|
||||
throw=BusinessException msg=user_id 不合法
|
||||
counters lockAcquire=0 taskStatus=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=0
|
||||
== case=emptyFileListRejectedBeforeLock
|
||||
throw=BusinessException msg=文件列表不能为空
|
||||
counters lockAcquire=0 taskStatus=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=0
|
||||
== case=nullRequestRejectedBeforeLock
|
||||
throw=BusinessException msg=文件列表不能为空
|
||||
counters lockAcquire=0 taskStatus=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=0
|
||||
== case=nullFileObjectRejected
|
||||
throw=BusinessException msg=files 不能包含空对象
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=0
|
||||
== case=duplicateFileInOneRequestRejected
|
||||
throw=BusinessException msg=同一文件不能在一次请求中重复提交
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> -
|
||||
chunk.selectOne idx=1 -> -
|
||||
storage.ensure sharedWrite=true
|
||||
payload.storeChunk idx=1 len=136 hash=4528ed738ff3
|
||||
chunk.selectList size=0 idx=
|
||||
payload.resolve pointer=rustfs:chunk-1 -> len=136 hash=4528ed738ff3
|
||||
file.selectById id=9101 status=PENDING
|
||||
chunk.countReferenced -> 0
|
||||
payload.delete pointer=rustfs:chunk-1
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=1
|
||||
== case=locateByFileKeyUsesSelectOne
|
||||
result=void
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectOne -> id=9101 status=PENDING
|
||||
scope.selectOne -> -
|
||||
chunk.selectOne idx=1 -> -
|
||||
storage.ensure sharedWrite=true
|
||||
payload.storeChunk idx=1 len=136 hash=4528ed738ff3
|
||||
chunk.selectList size=0 idx=
|
||||
payload.resolve pointer=rustfs:chunk-1 -> len=136 hash=4528ed738ff3
|
||||
tx.begin
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> -
|
||||
chunk.selectOne idx=1 -> -
|
||||
chunk.insert idx=1/1 pointer=rustfs:chunk-1 hash=4528ed738ff38dd22d57966b149083a6b86f9cecbfc7adc3a82273c149c1d968
|
||||
chunk.selectList size=1 idx=1/1
|
||||
scope.selectOne -> -
|
||||
scope.insert chunkTotal=1 stateJson.len=37 stateJson.hash=bfb9a54b7c1d
|
||||
item.count -> 1
|
||||
item.delete
|
||||
item.insertBatch n=1
|
||||
file.update id=9101 status=SUCCESS totalRows=1 processedRows=1 error=-
|
||||
files.list size=1 id=9101/SUCCESS/total=1/processed=1/err=-
|
||||
result.selectOne -> -
|
||||
result.insert taskId=1001 sourceFilename=PUBLISH-1 rowCount=- success=0 contentType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
task.update id=1001 status=RUNNING successFileCount=1 failedFileCount=0 errorMessage=- finishedAt=-
|
||||
job.enqueue resultId=2001 scopeKey=task:1001:owner:node-A
|
||||
tx.commit
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=1 failedFileCount=0 errorMessage=- files=[id=9101/SUCCESS/total=1/processed=1/err=-] chunks=1 scope=7001 result=2001 jobEnqueue=1 payloadDelete=0
|
||||
== case=locateBySourceFilenameUsesSelectOne
|
||||
result=void
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectOne -> id=9101 status=PENDING
|
||||
scope.selectOne -> -
|
||||
chunk.selectOne idx=1 -> -
|
||||
storage.ensure sharedWrite=true
|
||||
payload.storeChunk idx=1 len=136 hash=4528ed738ff3
|
||||
chunk.selectList size=0 idx=
|
||||
payload.resolve pointer=rustfs:chunk-1 -> len=136 hash=4528ed738ff3
|
||||
tx.begin
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> -
|
||||
chunk.selectOne idx=1 -> -
|
||||
chunk.insert idx=1/1 pointer=rustfs:chunk-1 hash=4528ed738ff38dd22d57966b149083a6b86f9cecbfc7adc3a82273c149c1d968
|
||||
chunk.selectList size=1 idx=1/1
|
||||
scope.selectOne -> -
|
||||
scope.insert chunkTotal=1 stateJson.len=37 stateJson.hash=bfb9a54b7c1d
|
||||
item.count -> 1
|
||||
item.delete
|
||||
item.insertBatch n=1
|
||||
file.update id=9101 status=SUCCESS totalRows=1 processedRows=1 error=-
|
||||
files.list size=1 id=9101/SUCCESS/total=1/processed=1/err=-
|
||||
result.selectOne -> -
|
||||
result.insert taskId=1001 sourceFilename=PUBLISH-1 rowCount=- success=0 contentType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
||||
task.update id=1001 status=RUNNING successFileCount=1 failedFileCount=0 errorMessage=- finishedAt=-
|
||||
job.enqueue resultId=2001 scopeKey=task:1001:owner:node-A
|
||||
tx.commit
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=1 failedFileCount=0 errorMessage=- files=[id=9101/SUCCESS/total=1/processed=1/err=-] chunks=1 scope=7001 result=2001 jobEnqueue=1 payloadDelete=0
|
||||
== case=fileWithoutAnyLocatorRejected
|
||||
throw=BusinessException msg=回传文件缺少 fileId/fileKey/sourceFilename
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=0
|
||||
== case=lockBusyRejectedBeforeAnyLoad
|
||||
throw=BusinessException msg=任务正被占用,请稍后重试
|
||||
lock.acquire taskId=1001
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=0
|
||||
== case=rustfsDisabledRejectsBeforeStoring
|
||||
throw=BusinessException msg=RustFS 未配置,上架结果分片暂不可接收
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> -
|
||||
chunk.selectOne idx=1 -> -
|
||||
storage.ensure sharedWrite=false
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=0
|
||||
== case=nonRustfsPointerDeletesThenThrows
|
||||
throw=BusinessException msg=上架结果分片必须写入 RustFS
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> -
|
||||
chunk.selectOne idx=1 -> -
|
||||
storage.ensure sharedWrite=true
|
||||
payload.storeChunk idx=1 len=136 hash=4528ed738ff3
|
||||
payload.delete pointer=local:chunk-1
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=1
|
||||
== case=blankRowRejectedBeforeStoring
|
||||
throw=BusinessException msg=回传数据不能包含空白对象行
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> -
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=0
|
||||
== case=ownerMismatchRejectedInPrepare
|
||||
throw=TaskOwnerMismatchException msg=该任务已绑定到另一台服务实例处理,请通过原实例继续处理
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=- result=- jobEnqueue=0 payloadDelete=0
|
||||
== case=chunkTotalMustMatchScope
|
||||
throw=BusinessException msg=同一文件的 chunk_total 必须保持一致
|
||||
lock.acquire taskId=1001
|
||||
task.load id=1001 status=RUNNING module=PUBLISH userId=7
|
||||
file.selectById id=9101 status=PENDING
|
||||
scope.selectOne -> id=7001 chunkTotal=3 stateJson.len=22 stateJson.hash=505748527ede
|
||||
counters lockAcquire=1 taskStatus=RUNNING successFileCount=0 failedFileCount=0 errorMessage=- files=[id=9101/PENDING/total=0/processed=0/err=-] chunks=0 scope=7001 result=- jobEnqueue=0 payloadDelete=0
|
||||
Reference in New Issue
Block a user