linrrzqqq opened a new pull request, #62249:
URL: https://github.com/apache/doris/pull/62249
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
1. After deleting the cache file for the corresponding UDF, using it again
will cause an error.
```text
Unable to find source-code formatter for language: text. Available languages
are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go,
groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl,
php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml,
yaml</failure>
</testcase>
<testcase classname="stress.python_udf"
name="python_udf_module_cache_isolation" time="100.051">
<failure
message="flowId=stress/python_udf/udf_module_cache_isolation.groovy#python_udf_module_cache_isolation"
type="SuiteFailure"> logger.info("Scene 9a: function works before cache
deletion, result=${r9a[0][0]}")
// 删除所有 BE 上的 UDF cache 文件(只删文件,保留目录结构)
aliveBEs.each { be ->
execSSH(be.Host, "find /mnt/hdd01/PERFORMANCE_ENV/be/lib/udf/
-mindepth 2 -type f -delete 2>/dev/null; true")
}
logger.info("Scene 9b: UDF cache files deleted on all BEs")
// 再次调用,BE 应自动重新下载 zip 并执行
def r9b = sql "SELECT cache_recover_${runId}(10)"
^^^^^^^^^^^^^^^^^^^^^^^^^^ERROR LINE^^^^^^^^^^^^^^^^^^^^^^^^^^
assert r9b[0][0] == 787, "cache recover after delete: expected 787, got
${r9b[0][0]}"
logger.info("Scene 9c: function works after cache deletion,
result=${r9b[0][0]}")
// 批量验证恢复后的一致性
def r9c = sql "SELECT cache_recover_${runId}(val) FROM t_cache_batch
WHERE id <= 5 ORDER BY id"
for (int i = 0; i < 5; i++) {
def expected = (i + 1) + 777
assert r9c[i][0] == expected, "cache recover batch[${i}]: expected
${expected}, got ${r9c[i][0]}"
}
logger.info("Scene 9 PASS: cache auto-recovery after manual deletion —
all results consistent")
java.sql.SQLException: errCode = 2, detailMessage =
(172.20.49.73)[RUNTIME_ERROR]Flight stream finish failed with message:
Directory contains no Python (.py) files:
/mnt/hdd01/PERFORMANCE_ENV/be/lib/udf/5/1775636895621.2cfe161cc9c6f0b2ca5e7dcb6286e924.cache_recover.
Detail: Python exception: Traceback (most recent call last):
File "pyarrow/_flight.pyx", line 2315, in pyarrow._flight._do_exchange
File "/mnt/hdd01/PERFORMANCE_ENV/be/plugins/python_udf/python_server.py",
line 2493, in do_exchange
self._handle_exchange_udf(python_udf_meta, reader, writer)
File "/mnt/hdd01/PERFORMANCE_ENV/be/plugins/python_udf/python_server.py",
line 2005, in _handle_exchange_udf
loader = UDFLoaderFactory.get_loader(python_udf_meta)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/hdd01/PERFORMANCE_ENV/be/plugins/python_udf/python_server.py",
line 1161, in get_loader
if UDFLoaderFactory.check_module(location):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/hdd01/PERFORMANCE_ENV/be/plugins/python_udf/python_server.py",
line 1196, in check_module
raise ValueError(
ValueError: Directory contains no Python (.py) files:
/mnt/hdd01/PERFORMANCE_ENV/be/lib/udf/5/1775636895621.2cfe161cc9c6f0b2ca5e7dcb6286e924.cache_recover
```
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should
merge into -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]