This change adds a gen-bazel target which generates a WORKSPACE
file and runs gazelle to generate BUILD.bazelfiles. Generating
these files allows a local clone of the repository to be used
directly when building Cockroach using the override_repository flag,
for example:
./dev build short -- --override_repository=com_github_cockroachdb_pebble=~/go/src/github.com/cockroachdb/pebble
The new files are added to .gitignore so that generating them
doesn't interfere with commits.
We also add a clean-bazel target that cleans up these files (useful
when switching back to an older branch).
provider: consult readahead config when initializing handle
We currently retrieve the readahead config when we create a Readable
and then we use that config for all read handles. This makes the
settings not responsive, as any tables already in the table cache will
have the Readable created.
We change ReadaheadConfig to an atomic that is loaded every time we
initialize a read handle.
Backport of #3668
Makefile: add gen-bazel target
This change adds a
gen-bazel
target which generates aWORKSPACE
file and runs gazelle to generateBUILD.bazel
files. Generating these files allows a local clone of the repository to be used directly when building Cockroach using theoverride_repository
flag, for example:The new files are added to
.gitignore
so that generating them doesn't interfere with commits.We also add a
clean-bazel
target that cleans up these files (useful when switching back to an older branch).provider: consult readahead config when initializing handle
We currently retrieve the readahead config when we create a
Readable
and then we use that config for all read handles. This makes the settings not responsive, as any tables already in the table cache will have theReadable
created.We change
ReadaheadConfig
to an atomic that is loaded every time we initialize a read handle.