github-actions[bot] commented on code in PR #68613:
URL: https://github.com/apache/doris/pull/68613#discussion_r4142276591
##########
thirdparty/download-thirdparty.sh:
##########
@@ -752,35 +752,23 @@ if [[ " ${TP_ARCHIVES[*]} " =~ " AZURE " ]]; then
echo "Finished patching ${AZURE_SOURCE}"
fi
-# Apply Doris lance-c patches as one chain to the pinned release archive.
+# Foyer remains a local patch until its cache interface is accepted upstream.
+# All search fixes are supplied by the immutable lance-c dependency revision.
if [[ " ${TP_ARCHIVES[*]} " =~ " LANCE_C " ]]; then
- cd "${TP_SOURCE_DIR}/${LANCE_C_SOURCE}"
- if [[ ! -f "${PATCHED_MARK}" ]]; then
- # Apply the merged PRs first; the latest PR #73 and #79 both require
Lance v11.
- # This order keeps the upstream patches unchanged, including
Cargo.lock.
- for lance_patch in pr-74 pr-75-pr-78 pr-77 pr-73 pr-79 pr-80; do
- patch --batch --forward --reject-file=- --fuzz=0
--no-backup-if-mismatch -s \
- -p1 <"${TP_PATCH_DIR}/${LANCE_C_SOURCE}-${lance_patch}.patch"
- done
- touch "${PATCHED_MARK}"
+ foyer_patch_checksum="$(cksum < "${TP_PATCH_DIR}/lance-c-foyer.patch")"
+
foyer_patch_marker="${TP_SOURCE_DIR}/${LANCE_C_SOURCE}/${PATCHED_MARK}_foyer"
+ # A new local patch must also replace previously patched cached sources.
+ # Empty markers from older builds cannot identify the applied patch
version.
+ if [[ -f "${foyer_patch_marker}" ]] &&
+ [[ "$(cat "${foyer_patch_marker}")" != "${foyer_patch_checksum}" ]];
then
+ rm -rf "${TP_SOURCE_DIR}/${LANCE_C_SOURCE}"
Review Comment:
[P2] Recover cleanly from an interrupted Foyer refresh. When this checksum
mismatch removes a complete Lance tree, `tar` extracts directly into the final
source directory. If extraction stops after creating that directory, the next
run sees `-d` in the generic unpack loop and skips extraction; with no Foyer
marker, it patches an incomplete tree, potentially failing on every retry or
marking that tree ready. Extract into a temporary directory and replace the
source only after success, or delete the partial directory on failure and force
re-extraction on retry.
##########
thirdparty/test/lance-prefilter-patch-test.sh:
##########
@@ -0,0 +1,124 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -euo pipefail
+
+ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd)"
+ARCHIVE_DIR="${1:?Usage: $0 directory-containing-the-pinned-lance-c-archive}"
Review Comment:
[P3] Run the Lance patch lifecycle harness in CI. This new script checks
idempotence, stale-marker refresh, re-extraction, and failed-patch handling,
but no workflow or build entry point invokes it. The thirdparty workflow calls
other focused downloader scripts and its cold build covers only initial
extraction, so regressions in the new marker path will not fail the PR gate.
Add a workflow step that runs this harness with the pinned archive directory
after downloading the archive.
--
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]