Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 14 additions & 26 deletions thirdparty/download-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Comment thread
Gabriel39 marked this conversation as resolved.
"${TAR_CMD}" xzf "${TP_SOURCE_DIR}/${LANCE_C_NAME}" -C "${TP_SOURCE_DIR}/"
fi
# The base marker may already exist in cached sources; apply PR #83 independently.
if [[ ! -f "${PATCHED_MARK}_pr83" ]]; then
patch --batch --forward --reject-file=- --fuzz=0 --no-backup-if-mismatch -s \
-p1 <"${TP_PATCH_DIR}/${LANCE_C_SOURCE}-pr-83.patch"
touch "${PATCHED_MARK}_pr83"
fi
# Cached sources already have the base patches; pin the prefilter fix exactly once.
if [[ ! -f "${PATCHED_MARK}_prefilter" ]]; then
patch --batch --forward --reject-file=- --fuzz=0 --no-backup-if-mismatch -s \
-p1 <"${TP_PATCH_DIR}/${LANCE_C_SOURCE}-prefilter.patch"
touch "${PATCHED_MARK}_prefilter"
fi
# Cached sources may carry the earlier prefilter pin; upgrade FTS metrics independently.
if [[ ! -f "${PATCHED_MARK}_prefilter_fts" ]]; then
cd "${TP_SOURCE_DIR}/${LANCE_C_SOURCE}"
if [[ ! -f "${PATCHED_MARK}_foyer" ]]; then
patch --batch --forward --reject-file=- --fuzz=0 --no-backup-if-mismatch -s \
-p1 <"${TP_PATCH_DIR}/${LANCE_C_SOURCE}-prefilter-fts.patch"
touch "${PATCHED_MARK}_prefilter_fts"
-p1 <"${TP_PATCH_DIR}/lance-c-foyer.patch"
printf '%s\n' "${foyer_patch_checksum}" > "${PATCHED_MARK}_foyer"
fi
cd -
echo "Finished patching ${LANCE_C_SOURCE}"
Expand Down
Loading
Loading