-
Notifications
You must be signed in to change notification settings - Fork 247
Anser - runtime instrumentation - MVP with one bloomfilter #1942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
leborchuk
wants to merge
17
commits into
apache:main
Choose a base branch
from
leborchuk:anser-prs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a4f4249
Feature: Add core support for the Anser extension
leborchuk 4cb8533
Feature: Add the Anser adaptive information sharing extension
leborchuk f0682a8
Feature: Add Anser regression tests and CI coverage
leborchuk a7cfff5
Merge branch 'main' into anser-prs
leborchuk 71c8ae4
Fix RAT check gpcontrib/anser
leborchuk 7dd4c04
Rewrite Anser to use existing QD <> QE transport
leborchuk cda95a5
Fix compile issues after code rewrite
leborchuk 8acfa5b
Do not use frontend PQ api
leborchuk 997ac76
Add debug option to anser
leborchuk b0870ef
Fix bug that channel canceled stright away, add diagnostic to producer
leborchuk 620190d
More logs to find out what happens on producer site
leborchuk 921cadc
dispatcher drop remaining command on return
leborchuk f488229
Fix README
leborchuk a32b84c
Change protocol to uses CRC
leborchuk 3f743cc
Add forgotten files
leborchuk 8c9a01b
Use PG_UINT8_MAX
leborchuk 532deaa
Merge branch 'apache:main' into anser-prs
leborchuk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| #------------------------------------------------------------------------- | ||
| # | ||
| # 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. | ||
| # | ||
| # Makefile for the anser extension. | ||
| # | ||
| # IDENTIFICATION | ||
| # gpcontrib/anser/Makefile | ||
| # | ||
| #------------------------------------------------------------------------- | ||
|
|
||
| MODULE_big = anser | ||
| OBJS = \ | ||
| $(WIN32RES) \ | ||
| src/anserbloomconsume.o \ | ||
| src/anserbloomproduce.o \ | ||
| src/anserdispatch.o \ | ||
| src/anserfilter.o \ | ||
| src/anserinit.o \ | ||
| src/anserpayload.o \ | ||
| src/anserplan.o \ | ||
| src/anserplanexec.o \ | ||
| src/ansersideband.o \ | ||
| src/anser_test.o | ||
|
|
||
| PGFILEDESC = "anser - adaptive information sharing runtime filters" | ||
|
|
||
| # The subsystem itself needs no catalog objects -- it is configured entirely by | ||
| # GUCs and travels over the dispatch connection. The only extension here is | ||
| # anser_test, which exposes the internal C API to the regression tests from | ||
| # inside the same library. | ||
| EXTENSION = anser_test | ||
| DATA = anser_test--1.0.sql | ||
|
|
||
| REGRESS = anser_test anser_runtime_filter | ||
|
|
||
| # src/anserdispatch.c writes sideband messages onto the dispatcher's own libpq | ||
| # connections, so it needs libpq's internal headers (as the dispatcher itself | ||
| # does). Deliberately NOT linked against libpq: the pq* writers we use stay | ||
| # global in the postgres binary, while the public PQ* API is made local there | ||
| # on purpose (src/backend/Makefile), so linking libpq.so would put a second | ||
| # copy of libpq on connections the backend's copy created. | ||
| PG_CPPFLAGS = -I$(srcdir)/include -I$(libpq_srcdir) | ||
| SHLIB_PREREQS = submake-libpq | ||
|
|
||
| ifdef USE_PGXS | ||
| PG_CONFIG ?= pg_config | ||
| PGXS := $(shell $(PG_CONFIG) --pgxs) | ||
| include $(PGXS) | ||
| else | ||
| subdir = gpcontrib/anser | ||
| top_builddir = ../.. | ||
| include $(top_builddir)/src/Makefile.global | ||
| include $(top_srcdir)/contrib/contrib-global.mk | ||
| endif | ||
|
|
||
| # The tests need the live gather/send services, which only exist when the | ||
| # library is preloaded and anser.enable is on -- both postmaster-context | ||
| # settings. Ensure them (and restart) before installcheck, as | ||
| # gp_relsizes_stats does for its worker. | ||
| installcheck: preload-anser | ||
|
|
||
| .PHONY: preload-anser | ||
| preload-anser: | ||
| @if [ -z "$$COORDINATOR_DATA_DIRECTORY$$MASTER_DATA_DIRECTORY" ]; then \ | ||
| echo "ERROR: COORDINATOR_DATA_DIRECTORY (or MASTER_DATA_DIRECTORY) is not set;" >&2; \ | ||
| echo " source cloudberry-env.sh and gpdemo-env.sh before running installcheck." >&2; \ | ||
| exit 1; \ | ||
| fi | ||
| @current=`psql -d postgres -At -c "SHOW shared_preload_libraries;" | tr -d ' '`; \ | ||
| case ",$$current," in \ | ||
| *,anser,*) \ | ||
| echo "==> shared_preload_libraries already contains anser" ;; \ | ||
| *) \ | ||
| if [ -z "$$current" ]; then new=anser; else new="$$current,anser"; fi; \ | ||
| echo "==> Adding anser to shared_preload_libraries ($$new)"; \ | ||
| gpconfig -c shared_preload_libraries -v "'$$new'" --skipvalidation ;; \ | ||
| esac | ||
| gpconfig -c anser.enable -v on --skipvalidation | ||
| gpstop -ra | ||
| psql -d postgres -c "SHOW shared_preload_libraries;" | ||
|
|
||
| # CI runs a single make target per test config, so offer one target that | ||
| # installs the extension, arms the cluster, and runs the tests. | ||
| .PHONY: installcheck-with-install | ||
| installcheck-with-install: | ||
| $(MAKE) install | ||
| $(MAKE) installcheck |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any possibility to add a new configuration option, such as
--enable-anser?