Skip to content

Commit dcde49f

Browse files
committed
feat: AIO batchmode
Signed-off-by: usamoi <usamoi@outlook.com>
1 parent ac12e25 commit dcde49f

File tree

4 files changed

+30
-10
lines changed

4 files changed

+30
-10
lines changed

.github/workflows/check.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ concurrency:
1111

1212
jobs:
1313
style:
14+
if: |
15+
(github.event_name == 'push' && !contains(github.event.head_commit.message, 'job: -style')) ||
16+
(github.event_name == 'pull_request' && !contains(github.event.pull_request.body, 'job: -style')) ||
17+
github.event_name == 'workflow_dispatch'
18+
1419
runs-on: "ubuntu-24.04"
1520

1621
steps:
@@ -100,6 +105,11 @@ jobs:
100105
! grep -P '\t' -r ./sql
101106
102107
lint:
108+
if: |
109+
(github.event_name == 'push' && !contains(github.event.head_commit.message, 'job: -lint')) ||
110+
(github.event_name == 'pull_request' && !contains(github.event.pull_request.body, 'job: -lint')) ||
111+
github.event_name == 'workflow_dispatch'
112+
103113
strategy:
104114
matrix:
105115
arch: ["x86_64", "aarch64"]
@@ -817,7 +827,7 @@ jobs:
817827
818828
strategy:
819829
matrix:
820-
version: ["17"]
830+
version: ["17", "18"]
821831

822832
runs-on: "ubuntu-24.04"
823833

@@ -851,7 +861,7 @@ jobs:
851861
sudo chmod 700 /var/lib/postgresql
852862
sudo chown postgres:postgres /var/lib/postgresql
853863
854-
sudo pacman -S python clang valgrind --noconfirm
864+
sudo pacman -S python clang valgrind liburing numactl --noconfirm
855865
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain beta
856866
857867
curl -fsSL https://github.com/risinglightdb/sqllogictest-rs/releases/download/v0.28.4/sqllogictest-bin-v0.28.4-$(uname -m)-unknown-linux-musl.tar.gz | tar -xOzf - ./sqllogictest | sudo install -m 755 /dev/stdin /usr/local/bin/sqllogictest
@@ -861,9 +871,16 @@ jobs:
861871

862872
- name: Install PostgreSQL
863873
run: |
874+
if [ "${{ matrix.version }}" = "17" ]; then
875+
VERSION=17.6
876+
fi
877+
if [ "${{ matrix.version }}" = "18" ]; then
878+
VERSION=18.0
879+
fi
880+
864881
mkdir ~/postgresql-install
865-
curl -fsSL https://ftp.postgresql.org/pub/source/v17.6/postgresql-17.6.tar.bz2 | tar -xj -C ~/postgresql-install
866-
pushd ~/postgresql-install/postgresql-17.6
882+
curl -fsSL https://ftp.postgresql.org/pub/source/v$VERSION/postgresql-$VERSION.tar.bz2 | tar -xj -C ~/postgresql-install
883+
pushd ~/postgresql-install/postgresql-$VERSION
867884
./configure \
868885
--prefix=/usr \
869886
--sysconfdir=/etc \
@@ -881,6 +898,9 @@ jobs:
881898
--with-system-tzdata=/usr/share/zoneinfo \
882899
--with-uuid=e2fs \
883900
--with-zstd \
901+
${{ matrix.version >= 18 && '--with-libcurl' || '' }} \
902+
${{ matrix.version >= 18 && '--with-libnuma' || '' }} \
903+
${{ matrix.version >= 18 && '--with-liburing' || '' }} \
884904
--enable-debug \
885905
--enable-cassert \
886906
CC='sccache clang' \

src/index/vchordg/scanners/default.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ impl SearchBuilder for DefaultBuilder {
108108
let Some(vector) = vector else {
109109
return Box::new(std::iter::empty()) as Box<dyn Iterator<Item = (f32, [u16; 3], bool)>>;
110110
};
111-
let vertex_hints = Hints::default().full(true);
112-
let vector_hints = Hints::default().full(true);
111+
let vertex_hints = Hints::default().full(true).batch(true);
112+
let vector_hints = Hints::default().full(true).batch(true);
113113
let make_vertex_plain_prefetcher = MakePlainPrefetcher { index };
114114
let make_vertex_simple_prefetcher = MakeSimplePrefetcher { index };
115115
let make_vertex_stream_prefetcher = MakeStreamPrefetcher {

src/index/vchordrq/scanners/default.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ impl SearchBuilder for DefaultBuilder {
111111
let Some(vector) = vector else {
112112
return Box::new(std::iter::empty()) as Box<dyn Iterator<Item = (f32, [u16; 3], bool)>>;
113113
};
114-
let search_hints = Hints::default().full(true);
115-
let rerank_hints = Hints::default().full(false);
114+
let search_hints = Hints::default().full(true).batch(false);
115+
let rerank_hints = Hints::default().full(false).batch(true);
116116
let make_h1_plain_prefetcher = MakeH1PlainPrefetcher { index };
117117
let make_h0_plain_prefetcher = MakeH0PlainPrefetcher { index };
118118
let make_h0_simple_prefetcher = MakeH0SimplePrefetcher { index };

src/index/vchordrq/scanners/maxsim.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ impl SearchBuilder for MaxsimBuilder {
103103
pgrx::error!("maxsim search with rerank_in_table is not supported");
104104
}
105105
assert!(matches!(opfamily.distance_kind(), DistanceKind::Dot));
106-
let search_hints = Hints::default().full(true);
107-
let rerank_hints = Hints::default().full(false);
106+
let search_hints = Hints::default().full(true).batch(false);
107+
let rerank_hints = Hints::default().full(false).batch(true);
108108
let make_h1_plain_prefetcher = MakeH1PlainPrefetcher { index };
109109
let make_h0_plain_prefetcher = MakeH0PlainPrefetcher { index };
110110
let make_h0_simple_prefetcher = MakeH0SimplePrefetcher { index };

0 commit comments

Comments
 (0)