mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-06 19:12:50 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Refactor ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) Yes(ish) ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) ### Description Introduce pg_helio_distributed for distribution hooks and make pgmongo depend on that. Also makes the rum_join_scan loading of private rum bits optional ---- #### AI description (iteration 1) #### PR Classification New feature: Introduce Helio Distributed Extension #### PR Summary This pull request introduces the Helio Distributed Extension, which adds distributed execution capabilities to the Helio system. - Removed `shard_colocation.c` from `/pgmongo/src/distribution/` and added `distributed_hooks.c` in `/oss/private/pg_helio_distributed/src/distribution/`. - Updated `api_hook_impl.c` to use new distributed hooks. - Added new Makefile and build scripts for the Helio Distributed Extension in `/oss/private/pg_helio_distributed/`. - Introduced new test validation scripts and configurations in `/oss/private/pg_helio_distributed/src/test/regress/`. - Updated `pgmongo` Makefile to include the new distributed extension.
79 lines
2.2 KiB
Bash
Executable File
79 lines
2.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# fail if trying to reference a variable that is not set.
|
|
set -e
|
|
|
|
|
|
source="${BASH_SOURCE[0]}"
|
|
while [[ -h $source ]]; do
|
|
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
|
|
source="$(readlink "$source")"
|
|
|
|
# if $source was a relative symlink, we need to resolve it relative to the path where the
|
|
# symlink file was located
|
|
[[ $source != /* ]] && source="$scriptroot/$source"
|
|
done
|
|
|
|
repoScriptDir="$( cd -P "$( dirname "$source" )" && pwd )"
|
|
|
|
declare -A headerMap;
|
|
|
|
# Ensure unique headers between helio_core and helio_api
|
|
for f in $repoScriptDir/../pg_helio_core/include/**/*; do
|
|
subPath=${f#$repoScriptDir/../pg_helio_core/include/}
|
|
|
|
if [ "${headerMap[$subPath]}" != "" ]; then
|
|
echo "Duplicate header path found at $subPath. Header files must be unique across the extensions";
|
|
exit 1;
|
|
fi
|
|
headerMap[$subPath]=1;
|
|
|
|
done;
|
|
|
|
for f in $repoScriptDir/../pg_helio_api/include/**/*; do
|
|
subPath=${f#$repoScriptDir/../pg_helio_api/include/}
|
|
if [ "${headerMap[$subPath]}" != "" ]; then
|
|
echo "Duplicate header path found at $subPath. Header files must be unique across the extensions";
|
|
exit 1;
|
|
fi
|
|
headerMap[$subPath]=1;
|
|
done;
|
|
|
|
# Now check they don't duplicate with postgres's headers.
|
|
pg_include_dir=$(pg_config --includedir)
|
|
pg_include_dir_server=$(pg_config --includedir-server)
|
|
for f in ${!example_array[@]}
|
|
do
|
|
if [ -f "$pg_include_dir/$f"]; then
|
|
echo "Duplicate header path found at $f. Header files must not collide with postgres headers";
|
|
exit 1;
|
|
fi
|
|
|
|
if [ -f "$pg_include_dir_server/$f"]; then
|
|
echo "Duplicate header path found at $f. Header files must not collide with postgres server headers";
|
|
exit 1;
|
|
fi
|
|
done
|
|
|
|
hasInvalidHeaders="0"
|
|
|
|
for f in $(grep -R "include <server" --include \*.h --include \*.c oss)
|
|
do
|
|
echo "Invalid header file found $f do not reference header files via 'server'"
|
|
hasInvalidHeaders="1"
|
|
done
|
|
|
|
for f in $(grep -R "include \"server" --include \*.h --include \*.c oss)
|
|
do
|
|
echo "Invalid header file found $f do not reference header files via 'server'"
|
|
hasInvalidHeaders="1"
|
|
done
|
|
|
|
if [ "$hasInvalidHeaders" == "1" ]; then
|
|
exit 1;
|
|
fi
|
|
|
|
|
|
echo "Total headers checked ${#headerMap[@]}"
|
|
|