mirror of https://github.com/mongodb/mongo
SERVER-112222 Add all_headers opt out option (#42444)
GitOrigin-RevId: 6c29cbdbc89f65224fa84d44ea2d89e6c4b1a29c
This commit is contained in:
parent
56833113cf
commit
6ef58e3e37
1
.bazelrc
1
.bazelrc
|
|
@ -182,6 +182,7 @@ common --flag_alias=create_dwp=//bazel/config:create_dwp
|
|||
common --flag_alias=win_min_version=//bazel/config:win_min_version
|
||||
common --flag_alias=build_atlas=//bazel/config:build_atlas
|
||||
common --flag_alias=dtlto=//bazel/config:dtlto
|
||||
common --flag_alias=all_headers=//bazel/config:all_headers
|
||||
|
||||
#############################################################################################################################
|
||||
# BUILD 'PROFILES' - this is the area to set up configurations of flags to be used by developers.
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
*.sh text eol=lf
|
||||
**/third_party/**/* rules-lint-ignored=true
|
||||
**/third_party/**/BUILD.bazel rules-lint-ignored=false
|
||||
**/.auto_header/**/* rules-lint-ignored=true
|
||||
external rules-lint-ignored=true
|
||||
**/*.tpl.h rules-lint-ignored=true
|
||||
**/*.tpl.cpp rules-lint-ignored=true
|
||||
|
|
|
|||
|
|
@ -310,6 +310,10 @@ src/mongo/db/modules/enterprise/autogenerated_targets/BUILD.bazel
|
|||
.bazel_header_list_cache
|
||||
.bazel_real
|
||||
.mongo_checks_module_path
|
||||
MODULE.bazel
|
||||
MODULE.bazel.lock
|
||||
.auto_header
|
||||
|
||||
# generated configs for external fixture suites
|
||||
docker_compose/
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,99 @@
|
|||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Ensure a fast `fd` binary exists locally:
|
||||
- Detect OS/arch
|
||||
- Download from your S3 mirror once (validated by SHA)
|
||||
- Cache under ~/.cache/fd-binaries/v10.3.0/<platform>/fd[.exe] by default
|
||||
- Or use FD_CACHE_DIR environment variable to override
|
||||
- Return absolute path to the binary, or None if unsupported
|
||||
|
||||
Respects FD_PATH (force custom path) and FORCE_NO_FD (disable fd entirely).
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
import os, stat, sys, platform
|
||||
from pathlib import Path
|
||||
import traceback
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[2]
|
||||
sys.path.append(str(REPO_ROOT))
|
||||
|
||||
FD_VERSION = "v10.3.0"
|
||||
|
||||
|
||||
def _triplet() -> tuple[str, str]:
|
||||
sysname = platform.system().lower() # linux|darwin|windows
|
||||
mach = platform.machine().lower()
|
||||
if mach in ("x86_64", "amd64"):
|
||||
arch = "amd64"
|
||||
elif mach in ("aarch64", "arm64"):
|
||||
arch = "arm64"
|
||||
elif mach in ("ppc64le", "s390x"):
|
||||
arch = mach
|
||||
else:
|
||||
arch = mach
|
||||
return sysname, arch
|
||||
|
||||
|
||||
def _s3_url_for(sysname: str, arch: str) -> str | None:
|
||||
base = "https://mdb-build-public.s3.amazonaws.com/fd-binaries"
|
||||
if sysname == "darwin" and arch in ("amd64", "arm64"):
|
||||
return f"{base}/{FD_VERSION}/fd-darwin-{arch}"
|
||||
if sysname == "linux" and arch in ("amd64", "arm64"):
|
||||
return f"{base}/{FD_VERSION}/fd-linux-{arch}"
|
||||
if sysname == "windows" and arch in ("amd64", "arm64"):
|
||||
return f"{base}/{FD_VERSION}/fd-windows-{arch}.exe"
|
||||
return None # unsupported → trigger fallback
|
||||
|
||||
|
||||
def _make_executable(p: Path) -> None:
|
||||
if os.name != "nt":
|
||||
p.chmod(p.stat().st_mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
|
||||
|
||||
|
||||
def _cache_dir() -> Path:
|
||||
override = os.environ.get("FD_CACHE_DIR")
|
||||
if override:
|
||||
return Path(override).expanduser().resolve() / FD_VERSION
|
||||
return Path.home() / ".cache" / "fd-binaries" / FD_VERSION
|
||||
|
||||
|
||||
def ensure_fd() -> str | None:
|
||||
"""
|
||||
Returns absolute path to cached fd binary, or None if not available.
|
||||
"""
|
||||
if os.environ.get("FORCE_NO_FD"):
|
||||
return None
|
||||
if os.environ.get("FD_PATH"):
|
||||
return os.environ["FD_PATH"]
|
||||
|
||||
sysname, arch = _triplet()
|
||||
s3_url = _s3_url_for(sysname, arch)
|
||||
if not s3_url:
|
||||
return None
|
||||
|
||||
exe_name = "fd.exe" if sysname == "windows" else "fd"
|
||||
outdir = _cache_dir() / f"{sysname}-{arch}"
|
||||
outdir.mkdir(parents=True, exist_ok=True)
|
||||
local = outdir / exe_name
|
||||
|
||||
if local.exists():
|
||||
return local
|
||||
|
||||
try:
|
||||
from buildscripts.s3_binary.download import download_s3_binary
|
||||
|
||||
ok = download_s3_binary(
|
||||
s3_path=s3_url,
|
||||
local_path=str(local),
|
||||
remote_sha_allowed=False,
|
||||
ignore_file_not_exist=False,
|
||||
)
|
||||
if not ok:
|
||||
return None
|
||||
_make_executable(local)
|
||||
return str(local.resolve())
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
return None
|
||||
|
|
@ -0,0 +1,313 @@
|
|||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import threading
|
||||
import subprocess
|
||||
import hashlib, os, tempfile
|
||||
from pathlib import Path
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
# --- FAST-PATH HEADER LABEL GENERATOR (threaded) -----------------------------
|
||||
explicit_includes = []
|
||||
|
||||
|
||||
def _write_if_changed(out_path: Path, content: str, *, encoding="utf-8") -> bool:
|
||||
"""
|
||||
Atomically write `content` to `out_path` iff bytes differ.
|
||||
Returns True if file was written, False if unchanged.
|
||||
"""
|
||||
data = content.encode(encoding)
|
||||
|
||||
# Fast path: compare size first
|
||||
try:
|
||||
st = out_path.stat()
|
||||
if st.st_size == len(data):
|
||||
# Same size; compare content via hash (chunked)
|
||||
h_existing = hashlib.sha256()
|
||||
with out_path.open("rb") as f:
|
||||
for chunk in iter(lambda: f.read(1 << 20), b""):
|
||||
h_existing.update(chunk)
|
||||
h_new = hashlib.sha256(data).hexdigest()
|
||||
if h_existing.hexdigest() == h_new:
|
||||
return False # identical; skip write
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
|
||||
# Different (or missing): write to temp then replace atomically
|
||||
out_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
fd, tmp = tempfile.mkstemp(dir=str(out_path.parent), prefix=out_path.name + ".", suffix=".tmp")
|
||||
try:
|
||||
with os.fdopen(fd, "wb", buffering=0) as f:
|
||||
f.write(data)
|
||||
# Optionally ensure durability:
|
||||
# f.flush(); os.fsync(f.fileno())
|
||||
os.replace(tmp, out_path) # atomic on POSIX/Windows when same filesystem
|
||||
except Exception:
|
||||
# Best effort cleanup if something goes wrong
|
||||
try:
|
||||
os.unlink(tmp)
|
||||
except OSError:
|
||||
pass
|
||||
raise
|
||||
return True
|
||||
|
||||
|
||||
def _gen_labels_from_fd(repo_root: Path) -> list[str]:
|
||||
"""Stream fd output and return a list of raw labels like //pkg:file.h."""
|
||||
sys.path.append(str(repo_root))
|
||||
try:
|
||||
from bazel.auto_header.ensure_fd import ensure_fd # returns str|Path|None
|
||||
except Exception:
|
||||
ensure_fd = lambda **_: None # noqa: E731
|
||||
|
||||
fd_path = ensure_fd()
|
||||
if not fd_path:
|
||||
return [] # caller will fall back to Python walk
|
||||
|
||||
fd_path = str(fd_path) # normalize in case ensure_fd returns a Path
|
||||
|
||||
cmd = [
|
||||
fd_path,
|
||||
"-t",
|
||||
"f",
|
||||
"-0",
|
||||
"-g",
|
||||
"**.{h,hpp,hh,inc,ipp,idl,inl,defs}",
|
||||
"src/mongo",
|
||||
"-E",
|
||||
"third_party",
|
||||
"-E",
|
||||
"**/third_party/**",
|
||||
]
|
||||
|
||||
p = subprocess.Popen(
|
||||
cmd,
|
||||
cwd=repo_root,
|
||||
stdout=subprocess.PIPE,
|
||||
env=dict(os.environ, LC_ALL="C"), # stable bytewise sort on POSIX
|
||||
)
|
||||
rd = p.stdout.read
|
||||
buf = bytearray()
|
||||
labels: list[str] = []
|
||||
append = labels.append
|
||||
|
||||
while True:
|
||||
chunk = rd(1 << 16)
|
||||
if not chunk:
|
||||
break
|
||||
buf.extend(chunk)
|
||||
start = 0
|
||||
while True:
|
||||
try:
|
||||
i = buf.index(0, start)
|
||||
except ValueError:
|
||||
if start:
|
||||
del buf[:start]
|
||||
break
|
||||
s = buf[start:i].decode("utf-8", "strict")
|
||||
start = i + 1
|
||||
if not s.startswith("src/mongo/"):
|
||||
continue
|
||||
slash = s.rfind("/")
|
||||
pkg = s[:slash]
|
||||
base = s[slash + 1 :]
|
||||
if base.endswith(".idl"):
|
||||
append(f"//{pkg}:{base[:-4]}_gen.h") # file label
|
||||
elif base.endswith(".tpl.h"):
|
||||
append(f"//{pkg}:{base[:-6]}.h")
|
||||
else:
|
||||
append(f"//{pkg}:{base}")
|
||||
|
||||
# Tail (rare)
|
||||
if buf:
|
||||
s = buf.decode("utf-8", "strict")
|
||||
if s.startswith("src/mongo/"):
|
||||
slash = s.rfind("/")
|
||||
pkg = s[:slash]
|
||||
base = s[slash + 1 :]
|
||||
if base.endswith(".idl"):
|
||||
append(f"//{pkg}:{base[:-4]}_gen.h")
|
||||
elif base.endswith(".tpl.h"):
|
||||
append(f"//{pkg}:{base[:-6]}.h")
|
||||
else:
|
||||
append(f"//{pkg}:{base}")
|
||||
|
||||
p.wait()
|
||||
# De-dup & canonical sort
|
||||
labels = sorted(set(labels))
|
||||
return labels
|
||||
|
||||
|
||||
def _gen_labels_pywalk(repo_root: Path) -> list[str]:
|
||||
"""
|
||||
Pure-Python fallback → list of raw labels like //pkg:file.h,
|
||||
mirroring fd's filters and rewrites.
|
||||
"""
|
||||
start_dir = repo_root / "src" / "mongo" # match fd search root
|
||||
if not start_dir.exists():
|
||||
return []
|
||||
|
||||
# Exact-name excludes, plus "bazel-*" prefix
|
||||
EXCLUDE_DIRS = {
|
||||
"third_party", # exclude at any depth
|
||||
}
|
||||
|
||||
# Simple-pass extensions (anything else is ignored unless handled below)
|
||||
PASS_EXTS = (".h", ".hpp", ".hh", ".inc", ".ipp", ".inl", ".defs")
|
||||
|
||||
labels: list[str] = []
|
||||
append = labels.append
|
||||
root = str(repo_root)
|
||||
|
||||
for dirpath, dirnames, filenames in os.walk(str(start_dir), topdown=True, followlinks=False):
|
||||
# Prune dirs in-place for speed and correctness
|
||||
dirnames[:] = [d for d in dirnames if d not in EXCLUDE_DIRS]
|
||||
|
||||
rel_dir = os.path.relpath(dirpath, root).replace("\\", "/") # e.g. "src/mongo/...""
|
||||
|
||||
for fn in filenames:
|
||||
# Rewrite rules first (more specific)
|
||||
if fn.endswith(".tpl.h"):
|
||||
# "foo.tpl.h" -> "foo.h"
|
||||
append(f"//{rel_dir}:{fn[:-6]}.h")
|
||||
continue
|
||||
if fn.endswith(".idl"):
|
||||
# "foo.idl" -> "foo_gen.h"
|
||||
append(f"//{rel_dir}:{fn[:-4]}_gen.h")
|
||||
continue
|
||||
|
||||
# Pass-through if in the accepted set
|
||||
if fn.endswith(PASS_EXTS):
|
||||
append(f"//{rel_dir}:{fn}")
|
||||
|
||||
# De-dup + stable sort to mirror fd pipeline
|
||||
return sorted(set(labels))
|
||||
|
||||
|
||||
def _build_file_content(lines: str) -> str:
|
||||
return (
|
||||
'package(default_visibility = ["//visibility:public"])\n\n'
|
||||
"filegroup(\n"
|
||||
' name = "all_headers",\n'
|
||||
" srcs = [\n"
|
||||
f"{lines}"
|
||||
" ],\n"
|
||||
")\n"
|
||||
)
|
||||
|
||||
|
||||
MODULES_PREFIX = "src/mongo/db/modules/"
|
||||
|
||||
|
||||
def _stable_write(out_path: Path, content: str) -> bool:
|
||||
data = content.encode("utf-8")
|
||||
try:
|
||||
st = out_path.stat()
|
||||
if st.st_size == len(data):
|
||||
h_old = hashlib.sha256()
|
||||
with out_path.open("rb") as f:
|
||||
for chunk in iter(lambda: f.read(1 << 20), b""):
|
||||
h_old.update(chunk)
|
||||
if h_old.hexdigest() == hashlib.sha256(data).hexdigest():
|
||||
return False
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
out_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
fd, tmp = tempfile.mkstemp(dir=str(out_path.parent), prefix=out_path.name + ".", suffix=".tmp")
|
||||
with os.fdopen(fd, "wb", buffering=0) as f:
|
||||
f.write(data)
|
||||
os.replace(tmp, out_path)
|
||||
return True
|
||||
|
||||
|
||||
def _build_filegroup(lines: list[str], *, visibility: str | None = None) -> str:
|
||||
# lines must be sorted, each like: "//pkg:thing",\n
|
||||
body = "".join(lines)
|
||||
vis = visibility or "//visibility:public"
|
||||
return (
|
||||
f'package(default_visibility = ["{vis}"])\n\n'
|
||||
"filegroup(\n"
|
||||
' name = "all_headers",\n'
|
||||
" srcs = [\n"
|
||||
f"{body}"
|
||||
" ],\n"
|
||||
")\n"
|
||||
)
|
||||
|
||||
|
||||
def _bucket_label(label: str) -> tuple[str, str] | None:
|
||||
"""
|
||||
Returns (bucket, module_name) where:
|
||||
bucket == "GLOBAL" for non-module files
|
||||
bucket == "<module>" for files under src/mongo/db/modules/<module>/
|
||||
`label` is like //src/mongo/db/modules/atlas/foo:bar.h
|
||||
"""
|
||||
# peel off the leading // and split package and target
|
||||
if not label.startswith("//"):
|
||||
return None
|
||||
pkg = label[2:].split(":", 1)[0] # e.g. src/mongo/db/modules/atlas/foo
|
||||
if pkg.startswith(MODULES_PREFIX):
|
||||
parts = pkg[len(MODULES_PREFIX) :].split("/", 1)
|
||||
if parts and parts[0]:
|
||||
return (parts[0], parts[0]) # (bucket, module)
|
||||
return ("GLOBAL", "")
|
||||
|
||||
|
||||
def write_sharded_all_headers(repo_root: Path, labels: list[str]) -> dict[str, bool]:
|
||||
by_bucket: dict[str, list[str]] = {}
|
||||
for lbl in labels:
|
||||
buck, _ = _bucket_label(lbl) or ("GLOBAL", "")
|
||||
by_bucket.setdefault(buck, []).append(f' "{lbl}",\n')
|
||||
|
||||
results: dict[str, bool] = {}
|
||||
|
||||
# GLOBAL
|
||||
global_lines = sorted(by_bucket.get("GLOBAL", []))
|
||||
global_out = repo_root / "bazel" / "auto_header" / ".auto_header" / "BUILD.bazel"
|
||||
results[str(global_out)] = _stable_write(global_out, _build_filegroup(global_lines))
|
||||
|
||||
# modules
|
||||
for buck, lines in by_bucket.items():
|
||||
if buck == "GLOBAL":
|
||||
continue
|
||||
lines.sort()
|
||||
mod_dir = repo_root / "src" / "mongo" / "db" / "modules" / buck / ".auto_header"
|
||||
vis = f"//src/mongo/db/modules/{buck}:__subpackages__"
|
||||
outp = mod_dir / "BUILD.bazel"
|
||||
results[str(outp)] = _stable_write(outp, _build_filegroup(lines, visibility=vis))
|
||||
|
||||
return results
|
||||
|
||||
|
||||
def spawn_all_headers_thread(repo_root: Path) -> tuple[threading.Thread, dict]:
|
||||
state = {"ok": False, "t_ms": 0.0, "wrote": False, "err": None}
|
||||
|
||||
def _worker():
|
||||
t0 = time.perf_counter()
|
||||
try:
|
||||
labels = _gen_labels_from_fd(repo_root)
|
||||
if not labels:
|
||||
labels = _gen_labels_pywalk(repo_root)
|
||||
|
||||
for label in explicit_includes:
|
||||
bisect.insort(labels, label)
|
||||
|
||||
wrote_any = False
|
||||
results = write_sharded_all_headers(repo_root, labels)
|
||||
# results: {path: True/False}
|
||||
wrote_any = any(results.values())
|
||||
|
||||
state.update(ok=True, wrote=wrote_any)
|
||||
except Exception as e:
|
||||
state.update(ok=False, err=e)
|
||||
finally:
|
||||
state["t_ms"] = (time.perf_counter() - t0) * 1000.0
|
||||
|
||||
th = threading.Thread(target=_worker, name="all-headers-gen", daemon=True)
|
||||
th.start()
|
||||
return th, state
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
|
@ -2999,3 +2999,19 @@ selects.config_setting_group(
|
|||
":build_enterprise_enabled",
|
||||
],
|
||||
)
|
||||
|
||||
# --------------------------------------
|
||||
# all_headers
|
||||
# --------------------------------------
|
||||
|
||||
bool_flag(
|
||||
name = "all_headers",
|
||||
build_setting_default = False,
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "all_headers_enabled",
|
||||
flag_values = {
|
||||
"//bazel/config:all_headers": "True",
|
||||
},
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,12 @@ import pathlib
|
|||
import subprocess
|
||||
from typing import List, Union
|
||||
|
||||
from buildscripts.bazel_custom_formatter import validate_bazel_groups, validate_clang_tidy_configs
|
||||
from buildscripts.bazel_custom_formatter import (
|
||||
validate_bazel_groups,
|
||||
validate_clang_tidy_configs,
|
||||
validate_idl_naming,
|
||||
validate_private_headers,
|
||||
)
|
||||
|
||||
|
||||
def _git_distance(args: list) -> int:
|
||||
|
|
@ -206,6 +211,8 @@ def main() -> int:
|
|||
if files_to_format_contains_bazel_file(files_to_format):
|
||||
validate_clang_tidy_configs(generate_report=True, fix=not args.check)
|
||||
validate_bazel_groups(generate_report=True, fix=not args.check)
|
||||
validate_idl_naming(generate_report=True, fix=not args.check)
|
||||
validate_private_headers(generate_report=True, fix=not args.check)
|
||||
|
||||
if files_to_format != "all":
|
||||
files_to_format = [str(file) for file in files_to_format if os.path.isfile(file)]
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ load(
|
|||
"get_copts",
|
||||
"get_linkopts",
|
||||
)
|
||||
load("@bazel_skylib//lib:selects.bzl", "selects")
|
||||
load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain")
|
||||
load("@com_github_grpc_grpc//bazel:generate_cc.bzl", "generate_cc")
|
||||
load("@poetry//:dependencies.bzl", "dependency")
|
||||
|
|
@ -236,7 +237,7 @@ RE_ENABLE_DISABLED_3RD_PARTY_WARNINGS_FEATURES = select({
|
|||
|
||||
MONGO_GLOBAL_SRC_DEPS = [
|
||||
"//src/third_party/abseil-cpp:absl_base",
|
||||
"//src/third_party/boost:boost_system",
|
||||
"//src/third_party/boost:headers",
|
||||
"//src/third_party/croaring:croaring",
|
||||
"//src/third_party/fmt:fmt",
|
||||
"//src/third_party/libstemmer_c:stemmer",
|
||||
|
|
@ -348,6 +349,92 @@ def tidy_config_filegroup():
|
|||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
def _all_headers_label_for_pkg(pkg):
|
||||
if pkg.startswith("src/mongo/db/modules/enterprise"):
|
||||
return ["//src/mongo/db/modules/enterprise/.auto_header:all_headers"]
|
||||
elif pkg.startswith("src/mongo/db/modules/atlas"):
|
||||
return ["//src/mongo/db/modules/atlas/.auto_header:all_headers"]
|
||||
else:
|
||||
return ["//bazel/auto_header/.auto_header:all_headers"]
|
||||
|
||||
def _maybe_all_headers(name, hdrs, srcs, private_hdrs):
|
||||
pkg = native.package_name()
|
||||
if not (pkg.startswith("src/mongo") or "third_party" in pkg):
|
||||
return hdrs, srcs + private_hdrs
|
||||
|
||||
# 1) Wrap user-provided (possibly configurable) hdrs into a helper filegroup.
|
||||
# This isolates any select(...) inside the filegroup's srcs where it's legal.
|
||||
hdr_wrap = name + "_hdrs_wrap"
|
||||
native.filegroup(
|
||||
name = hdr_wrap,
|
||||
srcs = hdrs, # hdrs may already have select(...) — that's fine here
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
|
||||
# 2) Always-on config header (added outside the select to avoid duplication)
|
||||
mongo_cfg_hdr = ["//src/mongo:mongo_config_header"]
|
||||
|
||||
# 3) Select between the per-package all_headers filegroup and the wrapped hdrs.
|
||||
# IMPORTANT: both branches are *plain label lists* -> no nested selects.
|
||||
final_hdrs = (
|
||||
mongo_cfg_hdr +
|
||||
select({
|
||||
"//bazel/config:all_headers_enabled": _all_headers_label_for_pkg(pkg),
|
||||
"//conditions:default": [":" + hdr_wrap],
|
||||
})
|
||||
)
|
||||
|
||||
# 4) For srcs: include private_hdrs only when NOT all_headers.
|
||||
# Again, wrap the potentially-configurable list in a filegroup.
|
||||
if private_hdrs:
|
||||
priv_wrap = name + "_private_hdrs_wrap"
|
||||
native.filegroup(
|
||||
name = priv_wrap,
|
||||
srcs = private_hdrs,
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
extra_srcs = select({
|
||||
"//bazel/config:all_headers_enabled": [],
|
||||
"//conditions:default": [":" + priv_wrap],
|
||||
})
|
||||
else:
|
||||
extra_srcs = []
|
||||
|
||||
final_srcs = srcs + extra_srcs
|
||||
return final_hdrs, final_srcs
|
||||
|
||||
def _binary_srcs_with_all_headers(name, srcs, private_hdrs):
|
||||
pkg = native.package_name()
|
||||
if not (pkg.startswith("src/mongo") or "third_party" in pkg):
|
||||
return srcs + private_hdrs
|
||||
|
||||
# Always include the config header via srcs
|
||||
mongo_cfg_hdr = ["//src/mongo:mongo_config_header"]
|
||||
|
||||
# Wrap private_hdrs so any select(...) inside is contained.
|
||||
if private_hdrs:
|
||||
priv_wrap = name + "_private_hdrs_wrap"
|
||||
native.filegroup(
|
||||
name = priv_wrap,
|
||||
srcs = private_hdrs,
|
||||
visibility = ["//visibility:private"],
|
||||
)
|
||||
maybe_priv = select({
|
||||
"//bazel/config:all_headers_enabled": [],
|
||||
"//conditions:default": [":" + priv_wrap],
|
||||
})
|
||||
else:
|
||||
maybe_priv = []
|
||||
|
||||
# Add the per-package all_headers only when all_headers mode is on.
|
||||
# Both branches are plain lists → no nested selects.
|
||||
all_hdrs_branch = select({
|
||||
"//bazel/config:all_headers_enabled": _all_headers_label_for_pkg(pkg),
|
||||
"//conditions:default": [],
|
||||
})
|
||||
|
||||
return srcs + mongo_cfg_hdr + maybe_priv + all_hdrs_branch
|
||||
|
||||
def mongo_cc_library(
|
||||
name,
|
||||
srcs = [],
|
||||
|
|
@ -356,6 +443,7 @@ def mongo_cc_library(
|
|||
deps = [],
|
||||
cc_deps = [],
|
||||
header_deps = [],
|
||||
private_hdrs = [],
|
||||
testonly = False,
|
||||
visibility = None,
|
||||
data = [],
|
||||
|
|
@ -436,7 +524,9 @@ def mongo_cc_library(
|
|||
deps += TCMALLOC_DEPS
|
||||
|
||||
if native.package_name().startswith("src/mongo"):
|
||||
hdrs = hdrs + ["//src/mongo:mongo_config_header"]
|
||||
if "third_party" not in native.package_name():
|
||||
hdrs, srcs = _maybe_all_headers(name, hdrs, srcs, private_hdrs)
|
||||
|
||||
if name != "boost_assert_shim" and name != "mongoca" and name != "cyrus_sasl_windows_test_plugin":
|
||||
deps += MONGO_GLOBAL_SRC_DEPS
|
||||
features = features + RE_ENABLE_DISABLED_3RD_PARTY_WARNINGS_FEATURES
|
||||
|
|
@ -676,6 +766,7 @@ def _mongo_cc_binary_and_test(
|
|||
srcs = [],
|
||||
deps = [],
|
||||
header_deps = [],
|
||||
private_hdrs = [],
|
||||
testonly = False,
|
||||
visibility = None,
|
||||
data = [],
|
||||
|
|
@ -701,7 +792,8 @@ def _mongo_cc_binary_and_test(
|
|||
This can be configured via //config/bazel:linkstatic.""")
|
||||
|
||||
if native.package_name().startswith("src/mongo"):
|
||||
srcs = srcs + ["//src/mongo:mongo_config_header"]
|
||||
if "third_party" not in native.package_name():
|
||||
srcs = _binary_srcs_with_all_headers(name, srcs, private_hdrs)
|
||||
deps += MONGO_GLOBAL_SRC_DEPS
|
||||
features = features + RE_ENABLE_DISABLED_3RD_PARTY_WARNINGS_FEATURES
|
||||
|
||||
|
|
@ -874,6 +966,7 @@ def mongo_cc_binary(
|
|||
srcs = [],
|
||||
deps = [],
|
||||
header_deps = [],
|
||||
private_hdrs = [],
|
||||
testonly = False,
|
||||
visibility = None,
|
||||
data = [],
|
||||
|
|
@ -927,6 +1020,7 @@ def mongo_cc_binary(
|
|||
srcs,
|
||||
deps,
|
||||
header_deps,
|
||||
private_hdrs,
|
||||
testonly,
|
||||
visibility,
|
||||
data,
|
||||
|
|
@ -952,6 +1046,7 @@ def mongo_cc_test(
|
|||
srcs = [],
|
||||
deps = [],
|
||||
header_deps = [],
|
||||
private_hdrs = [],
|
||||
visibility = None,
|
||||
data = [],
|
||||
tags = [],
|
||||
|
|
@ -1020,6 +1115,7 @@ def mongo_cc_test(
|
|||
srcs,
|
||||
deps,
|
||||
header_deps,
|
||||
private_hdrs,
|
||||
True,
|
||||
visibility,
|
||||
data,
|
||||
|
|
@ -1051,6 +1147,7 @@ def mongo_cc_unit_test(
|
|||
srcs = [],
|
||||
deps = [],
|
||||
header_deps = [],
|
||||
private_hdrs = [],
|
||||
visibility = ["//visibility:public"],
|
||||
data = [],
|
||||
tags = [],
|
||||
|
|
@ -1071,6 +1168,7 @@ def mongo_cc_unit_test(
|
|||
srcs = srcs,
|
||||
deps = deps + ([] if has_custom_mainline else ["//src/mongo/unittest:unittest_main"]),
|
||||
header_deps = header_deps,
|
||||
private_hdrs = private_hdrs,
|
||||
visibility = visibility,
|
||||
data = data,
|
||||
tags = tags + ["mongo_unittest"],
|
||||
|
|
@ -1182,6 +1280,11 @@ idl_generator_rule = rule(
|
|||
default = [],
|
||||
),
|
||||
},
|
||||
outputs = {
|
||||
# These create addressable file labels:
|
||||
"gen_hdr": "%{name}.h",
|
||||
"gen_src": "%{name}.cpp",
|
||||
},
|
||||
doc = "Generates header/source files from IDL files.",
|
||||
toolchains = ["@bazel_tools//tools/python:toolchain_type"],
|
||||
fragments = ["py"],
|
||||
|
|
@ -1414,6 +1517,7 @@ def mongo_cc_benchmark(
|
|||
srcs = [],
|
||||
deps = [],
|
||||
header_deps = [],
|
||||
private_hdrs = [],
|
||||
visibility = None,
|
||||
data = [],
|
||||
tags = [],
|
||||
|
|
@ -1434,6 +1538,7 @@ def mongo_cc_benchmark(
|
|||
srcs = srcs,
|
||||
deps = deps + ([] if has_custom_mainline else ["//src/mongo/unittest:benchmark_main"]),
|
||||
header_deps = header_deps,
|
||||
private_hdrs = private_hdrs,
|
||||
visibility = visibility,
|
||||
data = data,
|
||||
tags = tags + ["mongo_benchmark"],
|
||||
|
|
@ -1455,6 +1560,7 @@ def mongo_cc_integration_test(
|
|||
srcs = [],
|
||||
deps = [],
|
||||
header_deps = [],
|
||||
private_hdrs = [],
|
||||
visibility = None,
|
||||
data = [],
|
||||
tags = [],
|
||||
|
|
@ -1475,6 +1581,7 @@ def mongo_cc_integration_test(
|
|||
srcs = srcs,
|
||||
deps = deps + ([] if has_custom_mainline else ["//src/mongo/unittest:integration_test_main"]),
|
||||
header_deps = header_deps,
|
||||
private_hdrs = private_hdrs,
|
||||
visibility = visibility,
|
||||
data = data,
|
||||
tags = tags + ["mongo_integration_test"],
|
||||
|
|
@ -1496,6 +1603,7 @@ def mongo_cc_fuzzer_test(
|
|||
srcs = [],
|
||||
deps = [],
|
||||
header_deps = [],
|
||||
private_hdrs = [],
|
||||
visibility = None,
|
||||
data = [],
|
||||
tags = [],
|
||||
|
|
@ -1516,6 +1624,7 @@ def mongo_cc_fuzzer_test(
|
|||
srcs = srcs,
|
||||
deps = deps,
|
||||
header_deps = header_deps,
|
||||
private_hdrs = private_hdrs,
|
||||
visibility = visibility,
|
||||
data = data,
|
||||
tags = tags + ["mongo_fuzzer_test"],
|
||||
|
|
@ -1545,6 +1654,7 @@ def mongo_cc_extension_shared_library(
|
|||
srcs = [],
|
||||
deps = [],
|
||||
header_deps = [],
|
||||
private_hdrs = [],
|
||||
visibility = None,
|
||||
data = [],
|
||||
tags = [],
|
||||
|
|
@ -1567,6 +1677,7 @@ def mongo_cc_extension_shared_library(
|
|||
"//src/mongo/db/extension/sdk:sdk_cpp",
|
||||
],
|
||||
header_deps = header_deps,
|
||||
private_hdrs = private_hdrs,
|
||||
visibility = visibility,
|
||||
data = data,
|
||||
tags = tags,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
#!/usr/bin/env python3
|
||||
import os
|
||||
import pathlib
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
REPO_ROOT = pathlib.Path(__file__).parent.parent.parent
|
||||
REPO_ROOT = Path(__file__).parent.parent.parent
|
||||
sys.path.append(str(REPO_ROOT))
|
||||
|
||||
# This script should be careful not to disrupt automatic mechanism which
|
||||
|
|
@ -18,6 +19,7 @@ wrapper_debug(f"wrapper hook script is using {sys.executable}")
|
|||
def main():
|
||||
install_modules(sys.argv[1], sys.argv[1:])
|
||||
|
||||
from bazel.auto_header.gen_all_headers import spawn_all_headers_thread
|
||||
from bazel.wrapper_hook.autogenerated_targets import autogenerate_targets
|
||||
from bazel.wrapper_hook.engflow_check import engflow_auth
|
||||
from bazel.wrapper_hook.generate_common_bes_bazelrc import write_workstation_bazelrc
|
||||
|
|
@ -25,6 +27,9 @@ def main():
|
|||
from bazel.wrapper_hook.plus_interface import check_bazel_command_type, test_runner_interface
|
||||
from bazel.wrapper_hook.set_mongo_variables import write_mongo_variables_bazelrc
|
||||
|
||||
# Kick off the fast-path generator BEFORE autogenerate_targets.
|
||||
th, hdr_state = spawn_all_headers_thread(REPO_ROOT)
|
||||
|
||||
# This is used to autogenerate a BUILD.bazel that creates
|
||||
# Filegroups for select tags - used to group targets for installing
|
||||
autogenerate_targets(sys.argv, sys.argv[1])
|
||||
|
|
@ -45,9 +50,7 @@ def main():
|
|||
args += ["--//bazel/config:build_atlas=False"]
|
||||
|
||||
engflow_auth(args)
|
||||
|
||||
write_workstation_bazelrc(args)
|
||||
|
||||
write_mongo_variables_bazelrc(args)
|
||||
|
||||
try:
|
||||
|
|
@ -58,11 +61,30 @@ def main():
|
|||
)
|
||||
except LinterFail:
|
||||
# Linter fails preempt bazel run.
|
||||
# Ensure the header thread is finished before exiting.
|
||||
th.join()
|
||||
if hdr_state["ok"]:
|
||||
wrapper_debug(
|
||||
f'[all_headers] done in {hdr_state["t_ms"]:.1f} ms '
|
||||
f'({"wrote" if hdr_state["wrote"] else "nochange"})'
|
||||
)
|
||||
else:
|
||||
print(f'[all_headers] failed: {hdr_state["err"]!r}')
|
||||
sys.exit(3)
|
||||
|
||||
else:
|
||||
args = sys.argv[2:]
|
||||
|
||||
# Join the header generator before finalizing args.
|
||||
th.join()
|
||||
if hdr_state["ok"]:
|
||||
wrapper_debug(
|
||||
f'[all_headers] done in {hdr_state["t_ms"]:.1f} ms '
|
||||
f'({"wrote" if hdr_state["wrote"] else "nochange"})'
|
||||
)
|
||||
else:
|
||||
print(f'[all_headers] failed: {hdr_state["err"]!r}')
|
||||
|
||||
os.chmod(os.environ.get("MONGO_BAZEL_WRAPPER_ARGS"), 0o644)
|
||||
with open(os.environ.get("MONGO_BAZEL_WRAPPER_ARGS"), "w") as f:
|
||||
f.write("\n".join(args))
|
||||
|
|
|
|||
|
|
@ -332,6 +332,359 @@ def validate_bazel_groups(generate_report, fix):
|
|||
put_report(report)
|
||||
|
||||
|
||||
def validate_idl_naming(generate_report: bool, fix: bool) -> None:
|
||||
"""
|
||||
Enforce:
|
||||
idl_generator(
|
||||
name = "<stem>_gen",
|
||||
src = "<stem>.idl" | ":gen_target" # where gen_target produces exactly one .idl
|
||||
)
|
||||
Single `bazel query --output=xml`, parse in-process. Also resolves src labels to generators.
|
||||
"""
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
bazel_bin = install_bazel(".")
|
||||
qopts = [
|
||||
"--implicit_deps=False",
|
||||
"--tool_deps=False",
|
||||
"--include_aspects=False",
|
||||
"--bes_backend=",
|
||||
"--bes_results_url=",
|
||||
]
|
||||
|
||||
# One narrowed query: only rules created by the idl_generator macro
|
||||
try:
|
||||
proc = subprocess.run(
|
||||
[
|
||||
bazel_bin,
|
||||
"query",
|
||||
"attr(generator_function, idl_generator, //src/...)",
|
||||
"--output=xml",
|
||||
]
|
||||
+ qopts,
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=True,
|
||||
)
|
||||
except subprocess.CalledProcessError as exc:
|
||||
print("BAZEL ERROR (narrowed xml):")
|
||||
print(exc.stdout)
|
||||
print(exc.stderr)
|
||||
sys.exit(exc.returncode)
|
||||
|
||||
root = ET.fromstring(proc.stdout)
|
||||
failures: list[tuple[str, str]] = []
|
||||
|
||||
def _val(rule, kind, attr):
|
||||
n = rule.find(f'./{kind}[@name="{attr}"]')
|
||||
return n.get("value") if n is not None else None
|
||||
|
||||
# Prepass: map rule label -> outputs so we can resolve src labels that generate an .idl
|
||||
outputs_by_rule: dict[str, list[str]] = {}
|
||||
for r in root.findall(".//rule"):
|
||||
rname = r.get("name")
|
||||
if not rname:
|
||||
continue
|
||||
outs = [n.get("name") for n in r.findall("./rule-output") if n.get("name")]
|
||||
outputs_by_rule[rname] = outs
|
||||
|
||||
for rule in root.findall(".//rule"):
|
||||
# Already narrowed, but keep the sentinel check cheap
|
||||
if _val(rule, "string", "generator_function") != "idl_generator":
|
||||
continue
|
||||
|
||||
rlabel = rule.get("name") or ""
|
||||
if not (rlabel.startswith("//") and ":" in rlabel):
|
||||
failures.append((rlabel or "<unknown>", "Malformed idl_generator rule label"))
|
||||
continue
|
||||
pkg, name = rlabel[2:].split(":", 1)
|
||||
|
||||
# Resolve src from label/string/srcs list
|
||||
src_val = _val(rule, "label", "src") or _val(rule, "string", "src")
|
||||
if not src_val:
|
||||
srcs_vals = []
|
||||
for lst in rule.findall('./list[@name="srcs"]'):
|
||||
srcs_vals += [n.get("value") for n in lst.findall("./label") if n.get("value")]
|
||||
srcs_vals += [n.get("value") for n in lst.findall("./string") if n.get("value")]
|
||||
if len(srcs_vals) == 1:
|
||||
src_val = srcs_vals[0]
|
||||
else:
|
||||
failures.append(
|
||||
(rlabel, f"'src'/'srcs' must have exactly one entry, got: {srcs_vals}")
|
||||
)
|
||||
continue
|
||||
|
||||
src = src_val.replace("\\", "/")
|
||||
src_base: str | None = None
|
||||
|
||||
if src.startswith("//"):
|
||||
spkg, sname = src[2:].split(":")
|
||||
if spkg != pkg:
|
||||
failures.append((rlabel, f"'src' must be in same package '{pkg}', got '{src}'"))
|
||||
if sname.endswith(".idl"):
|
||||
src_base = os.path.basename(sname)
|
||||
else:
|
||||
idl_outs = [o for o in outputs_by_rule.get(src, []) if o.endswith(".idl")]
|
||||
if len(idl_outs) != 1:
|
||||
failures.append(
|
||||
(
|
||||
rlabel,
|
||||
f"'src' '{src}' must produce exactly one .idl, got: {idl_outs or outputs_by_rule.get(src, [])}",
|
||||
)
|
||||
)
|
||||
continue
|
||||
src_base = os.path.basename(idl_outs[0].split(":", 1)[1])
|
||||
|
||||
elif src.startswith(":"):
|
||||
sname = src[1:]
|
||||
if sname.endswith(".idl"):
|
||||
src_base = os.path.basename(sname)
|
||||
else:
|
||||
abs_label = f"//{pkg}:{sname}"
|
||||
idl_outs = [o for o in outputs_by_rule.get(abs_label, []) if o.endswith(".idl")]
|
||||
if len(idl_outs) != 1:
|
||||
failures.append(
|
||||
(
|
||||
rlabel,
|
||||
f"'src' '{src}' must produce exactly one .idl, got: {idl_outs or outputs_by_rule.get(abs_label, [])}",
|
||||
)
|
||||
)
|
||||
continue
|
||||
src_base = os.path.basename(idl_outs[0].split(":", 1)[1])
|
||||
|
||||
else:
|
||||
if src.startswith("../") or "/../" in src:
|
||||
failures.append((rlabel, f"'src' must be within package '{pkg}', got '{src}'"))
|
||||
src_base = os.path.basename(src)
|
||||
|
||||
if not (src_base and src_base.endswith(".idl")):
|
||||
failures.append((rlabel, f"'src' must resolve to a .idl file, got: {src_base or src}"))
|
||||
continue
|
||||
|
||||
if not name.endswith("_gen"):
|
||||
failures.append((rlabel, "Target name must end with '_gen'"))
|
||||
|
||||
stem_from_name = name[:-4] if name.endswith("_gen") else name
|
||||
stem_from_src = src_base[:-4]
|
||||
if stem_from_name != stem_from_src:
|
||||
failures.append(
|
||||
(
|
||||
rlabel,
|
||||
f"Stem mismatch: name '{name}' vs src '{src_base}'. "
|
||||
f"Expected src basename '{stem_from_name}.idl'.",
|
||||
)
|
||||
)
|
||||
|
||||
if failures:
|
||||
for lbl, msg in failures:
|
||||
print(f"IDL naming violation: {lbl}: {msg}")
|
||||
if generate_report:
|
||||
report = make_report(lbl, msg, 1)
|
||||
try_combine_reports(report)
|
||||
put_report(report)
|
||||
|
||||
# print(time.time() - start)
|
||||
if fix and failures:
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def validate_private_headers(generate_report: bool, fix: bool) -> None:
|
||||
"""
|
||||
Fast header linter/fixer using concurrent buildozer reads:
|
||||
buildozer print label srcs //<scope>:%<macro>
|
||||
|
||||
- Lints if any header appears anywhere in the printed block (including select()/glob()).
|
||||
- Auto-fixes ONLY concrete items in the first [...] (top-level list).
|
||||
- Fails the run if a non-concrete header is detected (select()/glob()).
|
||||
"""
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
from shlex import split as shlex_split
|
||||
|
||||
# ---- Config ----
|
||||
HEADER_EXTS = (".h", ".hh", ".hpp", ".hxx")
|
||||
HEADER_RE = re.compile(r"\.(h|hh|hpp|hxx)\b")
|
||||
PUBLIC_KEEP = {
|
||||
"//src/mongo/platform:basic.h",
|
||||
"//src/mongo/platform:windows_basic.h",
|
||||
}
|
||||
SCOPE = "//src/mongo/..." # limit to your subtree
|
||||
MACRO_SELECTORS = [
|
||||
"%mongo_cc_library",
|
||||
"%mongo_cc_binary",
|
||||
"%mongo_cc_unit_test",
|
||||
"%mongo_cc_benchmark",
|
||||
"%mongo_cc_integration_test",
|
||||
"%mongo_cc_fuzzer_test",
|
||||
"%mongo_cc_extension_shared_library",
|
||||
]
|
||||
SKIP_SUFFIXES = ("_shared_archive", "_hdrs_wrap")
|
||||
SKIP_PKG_SUBSTR = "/third_party/"
|
||||
# If True, exit(1) whenever a header is found only via select()/glob()
|
||||
FAIL_ON_STRUCTURED = True
|
||||
|
||||
buildozer = download_buildozer()
|
||||
|
||||
def _run_print(selector: str) -> tuple[str, str]:
|
||||
"""Run one buildozer print invocation; return (selector, stdout)."""
|
||||
try:
|
||||
out = subprocess.run(
|
||||
[buildozer, "print label srcs", f"{SCOPE}:{selector}"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=True,
|
||||
).stdout
|
||||
return selector, out
|
||||
except subprocess.CalledProcessError as exc:
|
||||
# surface error and keep going (treated as empty output)
|
||||
print(f"BUILDOZER ERROR (print label srcs) for selector {selector}:", file=sys.stderr)
|
||||
print(exc.stdout, file=sys.stderr)
|
||||
print(exc.stderr, file=sys.stderr)
|
||||
return selector, ""
|
||||
|
||||
# 1) Run all macro prints concurrently
|
||||
outputs: list[str] = []
|
||||
with ThreadPoolExecutor(max_workers=min(4, max(1, len(MACRO_SELECTORS)))) as ex:
|
||||
futs = [ex.submit(_run_print, sel) for sel in MACRO_SELECTORS]
|
||||
for fut in as_completed(futs):
|
||||
_, stdout = fut.result()
|
||||
if stdout:
|
||||
outputs.append(stdout)
|
||||
|
||||
if not outputs:
|
||||
return
|
||||
|
||||
combined = "\n".join(outputs)
|
||||
|
||||
# 2) Parse into target blocks: start at lines beginning with //src/mongo...
|
||||
target_line_re = re.compile(r"^//src/mongo/[^:\s\[]+:[^\s\[]+")
|
||||
lines = combined.splitlines()
|
||||
blocks: list[tuple[str, list[str]]] = []
|
||||
cur_target: str | None = None
|
||||
cur_buf: list[str] = []
|
||||
|
||||
def flush():
|
||||
nonlocal cur_target, cur_buf
|
||||
if cur_target is not None:
|
||||
blocks.append((cur_target, cur_buf))
|
||||
cur_target, cur_buf = None, []
|
||||
|
||||
for line in lines:
|
||||
if target_line_re.match(line):
|
||||
flush()
|
||||
cur_target = line.split()[0]
|
||||
cur_buf = [line]
|
||||
elif cur_target is not None:
|
||||
cur_buf.append(line)
|
||||
flush()
|
||||
|
||||
failures: list[tuple[str, str]] = []
|
||||
fixes: list[tuple[str, str]] = [] # (cmd, target)
|
||||
structured_fail_found = False # to enforce FAIL_ON_STRUCTURED
|
||||
|
||||
def pkg_of(label: str) -> str:
|
||||
return label[2:].split(":", 1)[0]
|
||||
|
||||
def normalize_token(pkg: str, tok: str) -> str | None:
|
||||
t = tok.strip().strip(",")
|
||||
if not t:
|
||||
return None
|
||||
if t.startswith(("select(", "glob(")):
|
||||
return None
|
||||
if t.startswith("//"):
|
||||
return t
|
||||
if t.startswith(":"):
|
||||
return f"//{pkg}:{t[1:]}"
|
||||
# bare filename/path → pkg-local
|
||||
if not any(ch in t for ch in " []{}:\t\n"):
|
||||
return f"//{pkg}:{t}"
|
||||
return None
|
||||
|
||||
for target, buf in blocks:
|
||||
if target.endswith(SKIP_SUFFIXES) or SKIP_PKG_SUBSTR in target:
|
||||
continue
|
||||
|
||||
text = "\n".join(buf)
|
||||
|
||||
# quick lint: any .h* anywhere?
|
||||
if not HEADER_RE.search(text):
|
||||
continue
|
||||
|
||||
# first [...] only (top-level list)
|
||||
m = re.search(r"\[(.*?)\]", text, flags=re.DOTALL)
|
||||
top_tokens: list[str] = []
|
||||
if m:
|
||||
inner = m.group(1).replace("\n", " ").strip()
|
||||
if inner:
|
||||
try:
|
||||
top_tokens = shlex_split(inner)
|
||||
except ValueError:
|
||||
top_tokens = inner.split()
|
||||
|
||||
pkg = pkg_of(target)
|
||||
concrete_headers: list[str] = []
|
||||
for tok in top_tokens:
|
||||
norm = normalize_token(pkg, tok)
|
||||
if not norm:
|
||||
continue
|
||||
if norm in PUBLIC_KEEP:
|
||||
continue
|
||||
base = norm.split(":", 1)[1]
|
||||
if base.endswith(HEADER_EXTS):
|
||||
concrete_headers.append(norm)
|
||||
|
||||
structured_has_hdr = False
|
||||
if not concrete_headers:
|
||||
# If there were headers somewhere but none in first [...], we assume select()/glob()
|
||||
structured_has_hdr = True
|
||||
|
||||
if not concrete_headers and not structured_has_hdr:
|
||||
continue
|
||||
|
||||
canon_target = target.replace("_with_debug", "")
|
||||
|
||||
parts = []
|
||||
if concrete_headers:
|
||||
parts.append(f"concrete headers: {concrete_headers}")
|
||||
if structured_has_hdr:
|
||||
parts.append("headers via select()/glob() (not auto-fixed)")
|
||||
structured_fail_found = True
|
||||
|
||||
msg = f"{canon_target} has headers in srcs: " + "; ".join(parts)
|
||||
print(msg)
|
||||
failures.append((canon_target, msg))
|
||||
|
||||
if fix and concrete_headers:
|
||||
for h in concrete_headers:
|
||||
fixes.append((f"add private_hdrs {h}", canon_target))
|
||||
fixes.append((f"remove srcs {h}", canon_target))
|
||||
|
||||
# 3) Apply fixes (dedupe)
|
||||
if fix and fixes:
|
||||
seen = set()
|
||||
for cmd, tgt in fixes:
|
||||
key = (cmd, tgt)
|
||||
if key in seen:
|
||||
continue
|
||||
seen.add(key)
|
||||
subprocess.run([buildozer, cmd, tgt])
|
||||
|
||||
# 4) CI reports
|
||||
if failures and generate_report:
|
||||
for tlabel, msg in failures:
|
||||
report = make_report(tlabel, msg, 1)
|
||||
try_combine_reports(report)
|
||||
put_report(report)
|
||||
|
||||
# 5) Failing rules
|
||||
# - Always fail if any violation and not fixing (your existing behavior)
|
||||
# - Also fail if we saw non-concrete (structured) headers anywhere (requested)
|
||||
if (failures and not fix) or (structured_fail_found and FAIL_ON_STRUCTURED):
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
|
|
@ -340,6 +693,8 @@ def main():
|
|||
args = parser.parse_args()
|
||||
validate_clang_tidy_configs(args.generate_report, args.fix)
|
||||
validate_bazel_groups(args.generate_report, args.fix)
|
||||
validate_idl_naming(args.generate_report, args.fix)
|
||||
validate_private_headers(args.generate_report, args.fix)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
|
|
@ -18,4 +18,9 @@ S3_SHA256_HASHES = {
|
|||
"https://mdb-build-public.s3.amazonaws.com/ruff/0.6.9/ruff-x86_64-apple-darwin.tar.gz": "34aa37643e30dcb81a3c0e011c3a8df552465ea7580ba92ca727a3b7c6de25d1",
|
||||
"https://mdb-build-public.s3.amazonaws.com/ruff/0.6.9/ruff-x86_64-pc-windows-msvc.zip": "9d10e1282c5f695b2130cf593d55e37266513fc6d497edc4a30a6ed6d8ba4067",
|
||||
"https://mdb-build-public.s3.amazonaws.com/ruff/0.6.9/ruff-x86_64-unknown-linux-musl.tar.gz": "39a1cd878962ebc88322b4f6d33cae2292454563028f93a3f1f8ce58e3025b07",
|
||||
"https://mdb-build-public.s3.amazonaws.com/fd-binaries/v10.3.0/fd-darwin-amd64": "e3936d70c47bf8439797aa2c6c1ddff868424ff6bc418fc8501e819a2d58ccad",
|
||||
"https://mdb-build-public.s3.amazonaws.com/fd-binaries/v10.3.0/fd-darwin-arm64": "14134aadba85ab2cfe4494d0f44253145f897b77a23fd4d7df2cb4929b53c786",
|
||||
"https://mdb-build-public.s3.amazonaws.com/fd-binaries/v10.3.0/fd-linux-amd64": "9f48273b6c780a5f4f084ef30bc67d98cbd7d10c55c4605cf3a6ee29b741af87",
|
||||
"https://mdb-build-public.s3.amazonaws.com/fd-binaries/v10.3.0/fd-linux-arm64": "d0fc407937b8a8aec44f3a80b4a08219ba61dde234590358abb168b44478d493",
|
||||
"https://mdb-build-public.s3.amazonaws.com/fd-binaries/v10.3.0/fd-windows-amd64.exe": "fd3d4853da7a319a604e1cb03ede88cbf584edd12b89a0991871fb4d9cd3ba5b",
|
||||
}
|
||||
|
|
|
|||
|
|
@ -178,6 +178,30 @@ tasks:
|
|||
--keep_going
|
||||
--build_tag_filters=${bazel_filters_for_cache_hydration}
|
||||
|
||||
- name: hydrate_bazel_profile_all_headers
|
||||
tags:
|
||||
[
|
||||
"assigned_to_jira_team_devprod_build",
|
||||
"bazel_cache_hydration",
|
||||
"auxiliary",
|
||||
]
|
||||
depends_on:
|
||||
- name: version_expansions_gen
|
||||
variant: generate-tasks-for-version
|
||||
commands:
|
||||
- func: "bazel compile"
|
||||
vars:
|
||||
targets: //src/...
|
||||
# Use --linkopt="-s" to dramatically reduce link time, since we only care about hydrating cache
|
||||
# on CppCompile as CppLink is performed locally and not cached remotely.
|
||||
bazel_args: >-
|
||||
--config=fastbuild
|
||||
--all_headers=True
|
||||
--define GIT_COMMIT_HASH=nogitversion
|
||||
--output_groups=compilation_outputs
|
||||
--keep_going
|
||||
--build_tag_filters=${bazel_filters_for_cache_hydration}
|
||||
|
||||
- name: build_source_graph_index
|
||||
tags: ["assigned_to_jira_team_devprod_build", "auxiliary"]
|
||||
depends_on:
|
||||
|
|
@ -1298,6 +1322,12 @@ task_groups:
|
|||
- hydrate_bazel_profile_dbg_aubsan
|
||||
- hydrate_bazel_profile_dbg_tsan
|
||||
|
||||
- <<: *compile_task_group_template
|
||||
name: hydrate_all_headers_TG
|
||||
max_hosts: -1
|
||||
tasks:
|
||||
- hydrate_bazel_profile_all_headers
|
||||
|
||||
- <<: *compile_task_group_template
|
||||
name: build_source_graph_index_TG
|
||||
max_hosts: -1
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ buildvariants:
|
|||
resmoke_jobs_max: 6
|
||||
tasks:
|
||||
- name: compile_test_serial_TG
|
||||
- name: hydrate_all_headers_TG
|
||||
- name: run_bazel_compiledb
|
||||
- name: run_unit_tests_8_way_split_TG
|
||||
- name: audit
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ buildvariants:
|
|||
evergreen_remote_exec: on
|
||||
tasks:
|
||||
- name: hydrate_bazel_profile_TG
|
||||
- name: hydrate_all_headers_TG
|
||||
- name: .clang_tidy
|
||||
|
||||
- name: &workstation_bazel_cache_hydration_x86_64 workstation_bazel_cache_hydration_x86_64
|
||||
|
|
|
|||
|
|
@ -70,6 +70,9 @@ buildvariants:
|
|||
- name: compile_test_serial_no_unittests_TG
|
||||
distros:
|
||||
- windows-2022-xxxlarge-compile
|
||||
- name: hydrate_all_headers_TG
|
||||
distros:
|
||||
- windows-2022-xxxlarge-compile
|
||||
- name: run_bazel_compiledb
|
||||
- name: run_unit_tests_no_sandbox_TG
|
||||
distros:
|
||||
|
|
|
|||
|
|
@ -303,7 +303,6 @@ mongo_cc_library(
|
|||
"//src/mongo/platform:shared_library.h",
|
||||
"//src/mongo/platform:source_location.h",
|
||||
"//src/mongo/platform:stack_locator.h",
|
||||
"//src/mongo/platform:stack_locator_pthread_getattr_np.cpp",
|
||||
"//src/mongo/platform:strcasestr.h",
|
||||
"//src/mongo/platform:strnlen.h",
|
||||
"//src/mongo/platform:waitable_atomic.h",
|
||||
|
|
|
|||
|
|
@ -129,8 +129,8 @@ mongo_cc_unit_test(
|
|||
"string_data_test.cpp",
|
||||
"system_error_test.cpp",
|
||||
"uuid_test.cpp",
|
||||
"//src/mongo/base:data_type_validated.h",
|
||||
],
|
||||
private_hdrs = [":data_type_validated.h"],
|
||||
tags = [
|
||||
"mongo_unittest_seventh_group",
|
||||
"platform",
|
||||
|
|
|
|||
|
|
@ -54,8 +54,10 @@ mongo_cc_unit_test(
|
|||
"oid_test.cpp",
|
||||
"ordering_test.cpp",
|
||||
"simple_bsonobj_comparator_test.cpp",
|
||||
"//src/mongo/bson:bsonelement_comparator.h",
|
||||
"//src/mongo/bson:bsonobj_comparator.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
":bsonelement_comparator.h",
|
||||
":bsonobj_comparator.h",
|
||||
],
|
||||
tags = [
|
||||
"mongo_unittest_first_group",
|
||||
|
|
@ -87,8 +89,8 @@ mongo_cc_fuzzer_test(
|
|||
srcs = [
|
||||
"bson_validate_fuzzer.cpp",
|
||||
"bson_validate_old.cpp",
|
||||
"bson_validate_old.h",
|
||||
],
|
||||
private_hdrs = [":bson_validate_old.h"],
|
||||
deps = [
|
||||
"//src/mongo:base",
|
||||
"//src/mongo/bson:bson_validate",
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ exports_files(
|
|||
glob([
|
||||
"*.h",
|
||||
"*.cpp",
|
||||
"*.inl",
|
||||
]),
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -49,11 +49,11 @@ mongo_cc_library(
|
|||
mongo_cc_unit_test(
|
||||
name = "bson_util_test",
|
||||
srcs = [
|
||||
"bson_check.h",
|
||||
"bson_check_test.cpp",
|
||||
"bson_extract_test.cpp",
|
||||
"builder_test.cpp",
|
||||
],
|
||||
private_hdrs = [":bson_check.h"],
|
||||
tags = ["mongo_unittest_eighth_group"],
|
||||
deps = [
|
||||
":bson_extract",
|
||||
|
|
|
|||
|
|
@ -17,13 +17,15 @@ mongo_cc_library(
|
|||
srcs = [
|
||||
"connection_string.cpp",
|
||||
"mongo_uri.cpp",
|
||||
"//src/mongo/db/auth:sasl_command_constants.h",
|
||||
"//src/mongo/util:dns_name.h",
|
||||
],
|
||||
hdrs = [
|
||||
"connection_string.h",
|
||||
"mongo_uri.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/auth:sasl_command_constants.h",
|
||||
"//src/mongo/util:dns_name.h",
|
||||
],
|
||||
deps = [
|
||||
"//src/mongo/util:dns_query",
|
||||
"//src/mongo/util/net:network",
|
||||
|
|
@ -598,12 +600,14 @@ mongo_cc_unit_test(
|
|||
"server_ping_monitor_test.cpp",
|
||||
"streamable_replica_set_monitor_discovery_time_processor_test.cpp",
|
||||
"streamable_replica_set_monitor_error_handler_test.cpp",
|
||||
"//src/mongo/util:executor_test_util.h",
|
||||
"//src/mongo/util:future_test_utils.h",
|
||||
],
|
||||
data = [
|
||||
"//src/mongo/client/mongo_uri_tests:test_data",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/util:executor_test_util.h",
|
||||
"//src/mongo/util:future_test_utils.h",
|
||||
],
|
||||
tags = ["mongo_unittest_fourth_group"],
|
||||
target_compatible_with = select({
|
||||
"//bazel/config:use_wiredtiger_enabled": [],
|
||||
|
|
|
|||
|
|
@ -1,43 +0,0 @@
|
|||
# Copyright (C) 2022-present MongoDB, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the Server Side Public License, version 1,
|
||||
# as published by MongoDB, Inc.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# Server Side Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the Server Side Public License
|
||||
# along with this program. If not, see
|
||||
# <http://www.mongodb.com/licensing/server-side-public-license>.
|
||||
#
|
||||
# As a special exception, the copyright holders give permission to link the
|
||||
# code of portions of this program with the OpenSSL library under certain
|
||||
# conditions as described in each individual source file and distribute
|
||||
# linked combinations including the program with the OpenSSL library. You
|
||||
# must comply with the Server Side Public License in all respects for
|
||||
# all of the code used other than as permitted herein. If you modify file(s)
|
||||
# with this exception, you may extend this exception to your version of the
|
||||
# file(s), but you are not obligated to do so. If you do not wish to do so,
|
||||
# delete this exception statement from your version. If you delete this
|
||||
# exception statement from all source files in the program, then also delete
|
||||
# it in the license file.
|
||||
#
|
||||
|
||||
global:
|
||||
cpp_namespace: "mongo"
|
||||
|
||||
server_parameters:
|
||||
connectionAcquisitionToWireLoggingRate:
|
||||
description: >-
|
||||
The rate at which egress connection metrics below a certain time threshold will be logged at
|
||||
info level. This only applies for the 'network.totalConnectionAcquiredToWireMillis'
|
||||
server status metric.
|
||||
set_at: [startup, runtime]
|
||||
cpp_vartype: AtomicWord<double>
|
||||
cpp_varname: gConnectionAcquisitionToWireLoggingRate
|
||||
default: 0.05
|
||||
validator: {gte: 0.0, lte: 1.0}
|
||||
redact: false
|
||||
|
|
@ -410,20 +410,22 @@ mongo_cc_unit_test(
|
|||
"sha256_block_test.cpp",
|
||||
"sha512_block_test.cpp",
|
||||
"symmetric_crypto_test.cpp",
|
||||
"//src/mongo/crypto:test_vectors/edges_decimal128.cstruct.h",
|
||||
"//src/mongo/crypto:test_vectors/edges_double.cstruct.h",
|
||||
"//src/mongo/crypto:test_vectors/edges_int32.cstruct.h",
|
||||
"//src/mongo/crypto:test_vectors/edges_int64.cstruct.h",
|
||||
"//src/mongo/crypto:test_vectors/mincover_decimal128.cstruct.h",
|
||||
"//src/mongo/crypto:test_vectors/mincover_decimal128_precision.cstruct.h",
|
||||
"//src/mongo/crypto:test_vectors/mincover_double.cstruct.h",
|
||||
"//src/mongo/crypto:test_vectors/mincover_double_precision.cstruct.h",
|
||||
"//src/mongo/crypto:test_vectors/mincover_int32.cstruct.h",
|
||||
"//src/mongo/crypto:test_vectors/mincover_int64.cstruct.h",
|
||||
] + select({
|
||||
"//bazel/config:mongo_crypto_openssl": ["jwt_test.cpp"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
private_hdrs = [
|
||||
"//src/mongo/crypto/test_vectors:edges_decimal128.cstruct.h",
|
||||
"//src/mongo/crypto/test_vectors:edges_double.cstruct.h",
|
||||
"//src/mongo/crypto/test_vectors:edges_int32.cstruct.h",
|
||||
"//src/mongo/crypto/test_vectors:edges_int64.cstruct.h",
|
||||
"//src/mongo/crypto/test_vectors:mincover_decimal128.cstruct.h",
|
||||
"//src/mongo/crypto/test_vectors:mincover_decimal128_precision.cstruct.h",
|
||||
"//src/mongo/crypto/test_vectors:mincover_double.cstruct.h",
|
||||
"//src/mongo/crypto/test_vectors:mincover_double_precision.cstruct.h",
|
||||
"//src/mongo/crypto/test_vectors:mincover_int32.cstruct.h",
|
||||
"//src/mongo/crypto/test_vectors:mincover_int64.cstruct.h",
|
||||
],
|
||||
tags = ["mongo_unittest_eighth_group"],
|
||||
deps = [
|
||||
":aead_encryption",
|
||||
|
|
@ -449,10 +451,10 @@ mongo_cc_unit_test(
|
|||
mongo_cc_unit_test(
|
||||
name = "jws_validator_test",
|
||||
srcs = [
|
||||
"jwks_fetcher_mock.h",
|
||||
"jws_validated_token_test.cpp",
|
||||
"jws_validator_test.cpp",
|
||||
],
|
||||
private_hdrs = [":jwks_fetcher_mock.h"],
|
||||
tags = ["mongo_unittest_fourth_group"],
|
||||
target_compatible_with = select({
|
||||
"//bazel/config:mongo_crypto_openssl": [],
|
||||
|
|
|
|||
|
|
@ -1,55 +0,0 @@
|
|||
# Copyright (C) 2019-present MongoDB, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the Server Side Public License, version 1,
|
||||
# as published by MongoDB, Inc.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# Server Side Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the Server Side Public License
|
||||
# along with this program. If not, see
|
||||
# <http://www.mongodb.com/licensing/server-side-public-license>.
|
||||
#
|
||||
# As a special exception, the copyright holders give permission to link the
|
||||
# code of portions of this program with the OpenSSL library under certain
|
||||
# conditions as described in each individual source file and distribute
|
||||
# linked combinations including the program with the OpenSSL library. You
|
||||
# must comply with the Server Side Public License in all respects for
|
||||
# all of the code used other than as permitted herein. If you modify file(s)
|
||||
# with this exception, you may extend this exception to your version of the
|
||||
# file(s), but you are not obligated to do so. If you do not wish to do so,
|
||||
# delete this exception statement from your version. If you delete this
|
||||
# exception statement from all source files in the program, then also delete
|
||||
# it in the license file.
|
||||
#
|
||||
|
||||
# SHA512Block type
|
||||
|
||||
global:
|
||||
cpp_namespace: "mongo"
|
||||
cpp_includes:
|
||||
- "mongo/crypto/sha512_block.h"
|
||||
|
||||
imports:
|
||||
- "mongo/db/basic_types.idl"
|
||||
|
||||
types:
|
||||
sha512Block:
|
||||
bson_serialization_type: bindata
|
||||
bindata_subtype: generic
|
||||
description: "A fixed-size byte array that holds the result of a SHA512 computation"
|
||||
cpp_type: mongo::SHA512Block
|
||||
serializer: "mongo::SHA512Block::toCDR"
|
||||
deserializer: "mongo::SHA512Block::fromBinData"
|
||||
is_view: false
|
||||
|
||||
sha512BlockHex:
|
||||
bson_serialization_type: string
|
||||
description: "A fixed size hex string representing a SHA512 computation"
|
||||
cpp_type: mongo::SHA512Block
|
||||
serializer: "mongo::SHA512Block::toHexString"
|
||||
deserializer: "mongo::SHA512Block::fromHexString"
|
||||
is_view: false
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
"*.cpp",
|
||||
]),
|
||||
)
|
||||
|
|
@ -44,13 +44,11 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "startup_warnings_mongod",
|
||||
srcs = [
|
||||
"startup_warnings_mongod.cpp",
|
||||
"//src/mongo/util:procparser.h",
|
||||
],
|
||||
srcs = ["startup_warnings_mongod.cpp"],
|
||||
hdrs = [
|
||||
"startup_warnings_mongod.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/util:procparser.h"],
|
||||
deps = [
|
||||
":startup_warnings_common",
|
||||
"//src/mongo/db/repl:repl_coordinator_interface", # TODO(SERVER-93876): Remove.
|
||||
|
|
@ -93,7 +91,7 @@ render_template(
|
|||
|
||||
idl_generator(
|
||||
name = "feature_flag_test_gen",
|
||||
src = ":feature_flag_test_tpl",
|
||||
src = ":feature_flag_test.idl",
|
||||
deps = [
|
||||
":basic_types_gen",
|
||||
"//src/mongo/db/cluster_parameters:cluster_server_parameter_gen",
|
||||
|
|
@ -188,7 +186,7 @@ mongo_cc_library(
|
|||
)
|
||||
|
||||
mongo_idl_library(
|
||||
name = "server_options_helpers_idl",
|
||||
name = "server_options_helpers",
|
||||
src = "server_options_helpers.idl",
|
||||
deps = [":server_base"],
|
||||
)
|
||||
|
|
@ -203,7 +201,7 @@ mongo_cc_library(
|
|||
],
|
||||
deps = [
|
||||
":server_base",
|
||||
":server_options_helpers_idl",
|
||||
":server_options_helpers",
|
||||
"//src/mongo/util/cmdline_utils",
|
||||
],
|
||||
)
|
||||
|
|
@ -272,7 +270,6 @@ mongo_cc_library(
|
|||
srcs = [
|
||||
"cluster_auth_mode_option_gen",
|
||||
"keyfile_option_gen",
|
||||
"mongod_options_general.h",
|
||||
"server_options_base.cpp",
|
||||
"server_options_base_gen",
|
||||
"server_options_general_gen",
|
||||
|
|
@ -281,6 +278,7 @@ mongo_cc_library(
|
|||
hdrs = [
|
||||
"server_options_base.h",
|
||||
],
|
||||
private_hdrs = [":mongod_options_general.h"],
|
||||
deps = [
|
||||
":connection_health_metrics_parameter", # TODO(SERVER-93876): Remove.
|
||||
":server_base",
|
||||
|
|
@ -547,13 +545,11 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "client_out_of_line_executor",
|
||||
srcs = [
|
||||
"client_out_of_line_executor.cpp",
|
||||
"//src/mongo/util:producer_consumer_queue.h",
|
||||
],
|
||||
srcs = ["client_out_of_line_executor.cpp"],
|
||||
hdrs = [
|
||||
"client_out_of_line_executor.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/util:producer_consumer_queue.h"],
|
||||
deps = [
|
||||
":service_context",
|
||||
"//src/mongo:base",
|
||||
|
|
@ -591,7 +587,7 @@ mongo_cc_library(
|
|||
)
|
||||
|
||||
idl_generator(
|
||||
name = "mirror_maestro_feature_flag_gen",
|
||||
name = "mirror_maestro_feature_flags_gen",
|
||||
src = "mirror_maestro_feature_flags.idl",
|
||||
)
|
||||
|
||||
|
|
@ -702,7 +698,6 @@ mongo_cc_library(
|
|||
"//src/mongo/db/local_catalog/shard_role_api:direct_connection_util.cpp",
|
||||
"//src/mongo/db/local_catalog/shard_role_api:shard_role.cpp",
|
||||
"//src/mongo/db/local_catalog/shard_role_api:shard_role_mock.cpp",
|
||||
"//src/mongo/db/repl:collection_utils.h",
|
||||
],
|
||||
hdrs = [
|
||||
"//src/mongo/db/local_catalog:catalog_helper.h",
|
||||
|
|
@ -715,6 +710,7 @@ mongo_cc_library(
|
|||
"//src/mongo/db/local_catalog/shard_role_api:shard_role.h",
|
||||
"//src/mongo/db/local_catalog/shard_role_api:shard_role_mock.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/db/repl:collection_utils.h"],
|
||||
deps = [
|
||||
":multitenancy", # TODO(SERVER-93876): Remove.
|
||||
":server_base",
|
||||
|
|
@ -762,10 +758,8 @@ mongo_cc_unit_test(
|
|||
|
||||
mongo_cc_unit_test(
|
||||
name = "multiple_collection_accessor_test",
|
||||
srcs = [
|
||||
"//src/mongo/db/query:multiple_collection_accessor.h",
|
||||
"//src/mongo/db/query:multiple_collection_accessor_test.cpp",
|
||||
],
|
||||
srcs = ["//src/mongo/db/query:multiple_collection_accessor_test.cpp"],
|
||||
private_hdrs = ["//src/mongo/db/query:multiple_collection_accessor.h"],
|
||||
tags = ["mongo_unittest_eighth_group"],
|
||||
deps = [
|
||||
":query_exec",
|
||||
|
|
@ -797,8 +791,8 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/db/vector_clock:vector_clock_mongod_test.cpp",
|
||||
"//src/mongo/db/vector_clock:vector_clock_test.cpp",
|
||||
"//src/mongo/db/vector_clock:vector_clock_test_fixture.cpp",
|
||||
"//src/mongo/db/vector_clock:vector_clock_test_fixture.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/db/vector_clock:vector_clock_test_fixture.h"],
|
||||
tags = ["mongo_unittest_fifth_group"],
|
||||
deps = [
|
||||
":keys_collection_client_direct",
|
||||
|
|
@ -909,7 +903,6 @@ mongo_cc_library(
|
|||
"commands.cpp",
|
||||
"curop.cpp",
|
||||
"curop_diagnostic_printer.cpp",
|
||||
"error_labels.h",
|
||||
"op_debug.cpp",
|
||||
"//src/mongo/db/commands/query_cmd:explain_gen",
|
||||
"//src/mongo/db/local_catalog/ddl:coll_mod_reply_validation.cpp",
|
||||
|
|
@ -926,6 +919,7 @@ mongo_cc_library(
|
|||
"op_debug.h",
|
||||
"//src/mongo/db/local_catalog/ddl:coll_mod_reply_validation.h",
|
||||
],
|
||||
private_hdrs = [":error_labels.h"],
|
||||
deps = [
|
||||
":api_parameters", # TODO(SERVER-93876): Remove.
|
||||
":audit",
|
||||
|
|
@ -1024,7 +1018,6 @@ mongo_cc_library(
|
|||
"//src/mongo/db/exec:plan_cache_util.cpp",
|
||||
"//src/mongo/db/exec/agg:cursor_stage.cpp",
|
||||
"//src/mongo/db/exec/agg:geo_near_cursor_stage.cpp",
|
||||
"//src/mongo/db/exec/classic:and_common.h",
|
||||
"//src/mongo/db/exec/classic:and_hash.cpp",
|
||||
"//src/mongo/db/exec/classic:and_sorted.cpp",
|
||||
"//src/mongo/db/exec/classic:batched_delete_stage.cpp",
|
||||
|
|
@ -1222,6 +1215,7 @@ mongo_cc_library(
|
|||
header_deps = [
|
||||
"//src/mongo/unittest",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/db/exec/classic:and_common.h"],
|
||||
deps = [
|
||||
"audit",
|
||||
"commands",
|
||||
|
|
@ -1696,7 +1690,7 @@ mongo_cc_library(
|
|||
"generic_argument_util.cpp",
|
||||
"index_names.cpp",
|
||||
"keypattern.cpp",
|
||||
"mirror_maestro_feature_flag_gen",
|
||||
"mirror_maestro_feature_flags_gen",
|
||||
"read_write_concern_provenance.cpp",
|
||||
"server_options.cpp",
|
||||
"server_parameter.cpp",
|
||||
|
|
@ -2214,12 +2208,6 @@ mongo_cc_library(
|
|||
"//src/mongo/db/exec/sbe/values:util.cpp",
|
||||
"//src/mongo/db/exec/sbe/values:value.cpp",
|
||||
"//src/mongo/db/exec/sbe/values:value_printer.cpp",
|
||||
"//src/mongo/db/exec/sbe/vm:vm_types.h",
|
||||
"//src/mongo/db/exec/timeseries:bucket_unpacker.h",
|
||||
"//src/mongo/db/pipeline/search:search_helper.h",
|
||||
"//src/mongo/db/query/search:search_task_executors.h",
|
||||
"//src/mongo/executor:task_executor_cursor.h",
|
||||
"//src/mongo/executor:task_executor_cursor_options.h",
|
||||
],
|
||||
hdrs = [
|
||||
"//src/mongo/db/exec:trial_run_tracker.h",
|
||||
|
|
@ -2273,6 +2261,14 @@ mongo_cc_library(
|
|||
"//src/mongo/util:field_set",
|
||||
"//src/mongo/db/timeseries:bucket_compression",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/exec/sbe/vm:vm_types.h",
|
||||
"//src/mongo/db/exec/timeseries:bucket_unpacker.h",
|
||||
"//src/mongo/db/pipeline/search:search_helper.h",
|
||||
"//src/mongo/db/query/search:search_task_executors.h",
|
||||
"//src/mongo/executor:task_executor_cursor.h",
|
||||
"//src/mongo/executor:task_executor_cursor_options.h",
|
||||
],
|
||||
deps = [
|
||||
"//src/mongo:base",
|
||||
"//src/mongo/bson/column", # TODO(SERVER-93876): Remove.
|
||||
|
|
@ -2677,7 +2673,6 @@ mongo_cc_library(
|
|||
srcs = [
|
||||
":fle_crud.cpp",
|
||||
"//src/mongo/db/commands:fle2_get_count_info_command_gen",
|
||||
"//src/mongo/db/global_catalog/router_role_api:ns_targeter.h",
|
||||
"//src/mongo/db/query/fle:encrypted_predicate.cpp",
|
||||
"//src/mongo/db/query/fle:equality_predicate.cpp",
|
||||
"//src/mongo/db/query/fle:query_rewriter.cpp",
|
||||
|
|
@ -2685,7 +2680,6 @@ mongo_cc_library(
|
|||
"//src/mongo/db/query/fle:range_validator.cpp",
|
||||
"//src/mongo/db/query/fle:server_rewrite.cpp",
|
||||
"//src/mongo/db/query/fle:text_search_predicate.cpp",
|
||||
"//src/mongo/s/write_ops:batch_write_exec.h",
|
||||
],
|
||||
hdrs = [
|
||||
":fle_crud.h",
|
||||
|
|
@ -2699,6 +2693,10 @@ mongo_cc_library(
|
|||
"//src/mongo/db/query/fle:server_rewrite_helper.h",
|
||||
"//src/mongo/db/query/fle:text_search_predicate.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/global_catalog/router_role_api:ns_targeter.h",
|
||||
"//src/mongo/s/write_ops:batch_write_exec.h",
|
||||
],
|
||||
deps = [
|
||||
":dbdirectclient",
|
||||
"//src/mongo/crypto:encrypted_field_config",
|
||||
|
|
@ -2753,9 +2751,7 @@ mongo_cc_unit_test(
|
|||
name = "fle_test",
|
||||
srcs = [
|
||||
"fle_crud_test.cpp",
|
||||
"//src/mongo/db/pipeline:expression_context_for_test.h",
|
||||
"//src/mongo/db/query/fle:encrypted_predicate_test_fixtures.cpp",
|
||||
"//src/mongo/db/query/fle:encrypted_predicate_test_fixtures.h",
|
||||
"//src/mongo/db/query/fle:equality_predicate_test.cpp",
|
||||
"//src/mongo/db/query/fle:implicit_validator_test.cpp",
|
||||
"//src/mongo/db/query/fle:query_rewriter_test.cpp",
|
||||
|
|
@ -2763,6 +2759,10 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/db/query/fle:range_validator_test.cpp",
|
||||
"//src/mongo/db/query/fle:text_search_predicate_test.cpp",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/pipeline:expression_context_for_test.h",
|
||||
"//src/mongo/db/query/fle:encrypted_predicate_test_fixtures.h",
|
||||
],
|
||||
tags = ["mongo_unittest_seventh_group"],
|
||||
target_compatible_with = select({
|
||||
"//bazel/config:use_wiredtiger_enabled": [],
|
||||
|
|
@ -2831,7 +2831,6 @@ mongo_cc_library(
|
|||
"change_stream_pre_images_tenant_truncate_markers.cpp",
|
||||
"change_stream_pre_images_truncate_manager.cpp",
|
||||
"change_stream_pre_images_truncate_markers_per_nsUUID.cpp",
|
||||
"//src/mongo/util:concurrent_shared_values_map.h",
|
||||
],
|
||||
hdrs = [
|
||||
"change_stream_pre_images_collection_manager.h",
|
||||
|
|
@ -2839,6 +2838,7 @@ mongo_cc_library(
|
|||
"change_stream_pre_images_truncate_manager.h",
|
||||
"change_stream_pre_images_truncate_markers_per_nsUUID.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/util:concurrent_shared_values_map.h"],
|
||||
deps = [
|
||||
":change_stream_options_manager",
|
||||
":change_stream_pre_image_util",
|
||||
|
|
@ -3686,10 +3686,8 @@ mongo_cc_unit_test(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "read_write_concern_defaults_mock",
|
||||
srcs = [
|
||||
"read_write_concern_defaults_cache_lookup_mock.cpp",
|
||||
"read_write_concern_defaults_cache_lookup_mock.h",
|
||||
],
|
||||
srcs = ["read_write_concern_defaults_cache_lookup_mock.cpp"],
|
||||
private_hdrs = [":read_write_concern_defaults_cache_lookup_mock.h"],
|
||||
deps = [
|
||||
":read_write_concern_defaults",
|
||||
],
|
||||
|
|
@ -3837,10 +3835,8 @@ mongo_cc_unit_test(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "commands_test_example",
|
||||
srcs = [
|
||||
"commands_test_example.h",
|
||||
":commands_test_example_gen",
|
||||
],
|
||||
srcs = [":commands_test_example_gen"],
|
||||
private_hdrs = [":commands_test_example.h"],
|
||||
deps = [
|
||||
":commands",
|
||||
":server_base",
|
||||
|
|
@ -3886,7 +3882,6 @@ mongo_cc_unit_test(
|
|||
name = "session_test",
|
||||
srcs = [
|
||||
"service_liaison_mock.cpp",
|
||||
"service_liaison_mock.h",
|
||||
"//src/mongo/db/session:internal_session_pool_test.cpp",
|
||||
"//src/mongo/db/session:internal_transactions_reap_service_test.cpp",
|
||||
"//src/mongo/db/session:kill_sessions_local_test.cpp",
|
||||
|
|
@ -3894,6 +3889,9 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/db/session:logical_session_id_test.cpp",
|
||||
"//src/mongo/db/session:session_catalog_mongod_test.cpp",
|
||||
"//src/mongo/db/session:session_catalog_test.cpp",
|
||||
],
|
||||
private_hdrs = [
|
||||
":service_liaison_mock.h",
|
||||
"//src/mongo/db/session:session_catalog_test.h",
|
||||
"//src/mongo/unittest:ensure_fcv.h",
|
||||
],
|
||||
|
|
@ -3983,6 +3981,8 @@ mongo_cc_unit_test(
|
|||
"wire_version_test.cpp",
|
||||
"//src/mongo/db:persistent_task_store_test.cpp",
|
||||
"//src/mongo/db/local_catalog/shard_role_api:resource_yielder_test.cpp",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/unittest:join_thread.h",
|
||||
"//src/mongo/util:executor_test_util.h",
|
||||
],
|
||||
|
|
@ -4109,12 +4109,12 @@ mongo_cc_unit_test(
|
|||
|
||||
mongo_cc_benchmark(
|
||||
name = "namespace_string_bm",
|
||||
srcs = [
|
||||
"//src/mongo/db:namespace_string_bm.cpp",
|
||||
"//src/mongo/util/immutable:map.h",
|
||||
"//src/mongo/util/immutable:unordered_map.h",
|
||||
srcs = ["//src/mongo/db:namespace_string_bm.cpp"],
|
||||
private_hdrs = [
|
||||
"//src/mongo/util/immutable/details:map.h",
|
||||
"//src/mongo/util/immutable/details:memory_policy.h",
|
||||
"//src/mongo/util/immutable:map.h",
|
||||
"//src/mongo/util/immutable:unordered_map.h",
|
||||
],
|
||||
deps = [
|
||||
":server_base",
|
||||
|
|
@ -4218,10 +4218,8 @@ mongo_cc_benchmark(
|
|||
|
||||
mongo_cc_benchmark(
|
||||
name = "service_entry_point_shard_role_bm",
|
||||
srcs = [
|
||||
"service_entry_point_bm_fixture.h",
|
||||
"service_entry_point_shard_role_bm.cpp",
|
||||
],
|
||||
srcs = ["service_entry_point_shard_role_bm.cpp"],
|
||||
private_hdrs = [":service_entry_point_bm_fixture.h"],
|
||||
tags = ["sep_bm"],
|
||||
deps = [
|
||||
":dbdirectclient",
|
||||
|
|
@ -4247,10 +4245,8 @@ mongo_cc_benchmark(
|
|||
|
||||
mongo_cc_benchmark(
|
||||
name = "crud_bm",
|
||||
srcs = [
|
||||
"crud_bm.cpp",
|
||||
"service_entry_point_bm_fixture.h",
|
||||
],
|
||||
srcs = ["crud_bm.cpp"],
|
||||
private_hdrs = [":service_entry_point_bm_fixture.h"],
|
||||
tags = ["sep_bm"],
|
||||
deps = [
|
||||
":mongod_options_init",
|
||||
|
|
@ -4281,10 +4277,8 @@ mongo_cc_benchmark(
|
|||
|
||||
mongo_cc_benchmark(
|
||||
name = "collection_acquisition_bm",
|
||||
srcs = [
|
||||
"//src/mongo/db/local_catalog/shard_role_api:collection_acquisition_bm.cpp",
|
||||
"//src/mongo/unittest:join_thread.h",
|
||||
],
|
||||
srcs = ["//src/mongo/db/local_catalog/shard_role_api:collection_acquisition_bm.cpp"],
|
||||
private_hdrs = ["//src/mongo/unittest:join_thread.h"],
|
||||
deps = [
|
||||
":service_context_d_test_fixture",
|
||||
":shard_role",
|
||||
|
|
|
|||
|
|
@ -66,12 +66,14 @@ mongo_cc_library(
|
|||
name = "address_restriction",
|
||||
srcs = [
|
||||
"address_restriction.cpp",
|
||||
"address_restriction.h",
|
||||
"restriction.h",
|
||||
"restriction_environment.h",
|
||||
"restriction_set.h",
|
||||
":address_restriction_gen",
|
||||
],
|
||||
private_hdrs = [
|
||||
":address_restriction.h",
|
||||
":restriction.h",
|
||||
":restriction_environment.h",
|
||||
":restriction_set.h",
|
||||
],
|
||||
deps = [
|
||||
"//src/mongo:base",
|
||||
"//src/mongo/idl:idl_parser", # TODO(SERVER-93876): Remove.
|
||||
|
|
@ -133,7 +135,6 @@ mongo_cc_library(
|
|||
"authorization_session_impl.cpp",
|
||||
"authz_session_external_state.cpp",
|
||||
":authorization_manager_impl_parameters_gen",
|
||||
"//src/mongo/db/auth:user_request_x509.h",
|
||||
],
|
||||
hdrs = [
|
||||
"authorization_manager_impl.h",
|
||||
|
|
@ -142,6 +143,7 @@ mongo_cc_library(
|
|||
"authz_session_external_state.h",
|
||||
"resource_pattern_search_list.h",
|
||||
],
|
||||
private_hdrs = [":user_request_x509.h"],
|
||||
deps = [
|
||||
":address_restriction",
|
||||
":auth",
|
||||
|
|
@ -455,7 +457,6 @@ mongo_cc_library(
|
|||
"authorization_manager.cpp",
|
||||
"authorization_manager_factory.cpp",
|
||||
"authorization_router.cpp",
|
||||
"//src/mongo/util/concurrency:thread_pool.h",
|
||||
],
|
||||
hdrs = [
|
||||
"authorization_backend_interface.h",
|
||||
|
|
@ -464,6 +465,7 @@ mongo_cc_library(
|
|||
"//src/mongo/db/commands:authentication_commands.h",
|
||||
"//src/mongo/util:sequence_util.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/util/concurrency:thread_pool.h"],
|
||||
deps = [
|
||||
"auth_options",
|
||||
"cluster_auth_mode",
|
||||
|
|
@ -738,7 +740,6 @@ mongo_cc_library(
|
|||
"sasl_mechanism_registry.cpp",
|
||||
"sasl_plain_server_conversation.cpp",
|
||||
"sasl_scram_server_conversation.cpp",
|
||||
"//src/mongo/crypto:mechanism_scram.h",
|
||||
] + select({
|
||||
"//bazel/config:ssl_enabled": [
|
||||
"sasl_x509_server_conversation.cpp",
|
||||
|
|
@ -759,6 +760,7 @@ mongo_cc_library(
|
|||
],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
private_hdrs = ["//src/mongo/crypto:mechanism_scram.h"],
|
||||
deps = [
|
||||
# TODO(SERVER-93876): Remove all except authorization_manager_global.
|
||||
"//src/mongo/base:secure_allocator",
|
||||
|
|
@ -853,14 +855,12 @@ mongo_cc_unit_test(
|
|||
"authentication_session_test.cpp",
|
||||
"authorization_contract_test.cpp",
|
||||
"authorization_manager_test.cpp",
|
||||
"authorization_router_impl_for_test.h",
|
||||
"authorization_session_test.cpp",
|
||||
"builtin_roles_test.cpp",
|
||||
"oauth_discovery_factory_test.cpp",
|
||||
"privilege_parser_test.cpp",
|
||||
"resolve_role_option_test.cpp",
|
||||
"resource_pattern_search_list_test.cpp",
|
||||
"restriction_mock.h",
|
||||
"restriction_test.cpp",
|
||||
"sasl_authentication_session_test.cpp",
|
||||
"sasl_mechanism_registry_test.cpp",
|
||||
|
|
@ -876,6 +876,10 @@ mongo_cc_unit_test(
|
|||
data = [
|
||||
"//jstests/libs:test_pem_files",
|
||||
],
|
||||
private_hdrs = [
|
||||
":authorization_router_impl_for_test.h",
|
||||
":restriction_mock.h",
|
||||
],
|
||||
tags = [
|
||||
# Segfaults in sandbox
|
||||
"code_coverage_quarantine",
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ mongo_cc_library(
|
|||
name = "test_commands_enabled",
|
||||
srcs = [
|
||||
"test_commands_enabled.cpp",
|
||||
"test_commands_enabled.h",
|
||||
":test_commands_enabled_gen",
|
||||
],
|
||||
private_hdrs = [":test_commands_enabled.h"],
|
||||
deps = [
|
||||
"//src/mongo/db:server_base",
|
||||
],
|
||||
|
|
@ -45,9 +45,9 @@ mongo_cc_library(
|
|||
name = "buildinfo_common",
|
||||
srcs = [
|
||||
"buildinfo_common.cpp",
|
||||
"buildinfo_common.h",
|
||||
":buildinfo_common_gen",
|
||||
],
|
||||
private_hdrs = [":buildinfo_common.h"],
|
||||
deps = [
|
||||
"//src/mongo:base",
|
||||
"//src/mongo/db:commands",
|
||||
|
|
@ -1214,7 +1214,6 @@ mongo_cc_unit_test(
|
|||
"profile_cmd_test.cpp",
|
||||
"set_profiling_filter_globally_cmd_test.cpp",
|
||||
"//src/mongo/db/cluster_parameters:set_cluster_parameter_invocation_test.cpp",
|
||||
"//src/mongo/db/commands:db_command_test_fixture.h",
|
||||
"//src/mongo/db/commands/query_cmd:aggregation_execution_state_test.cpp",
|
||||
"//src/mongo/db/commands/query_cmd:explain_test.cpp",
|
||||
"//src/mongo/db/commands/query_cmd:external_data_source_commands_test.cpp",
|
||||
|
|
@ -1223,7 +1222,6 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/db/commands/query_cmd:run_aggregate_test.cpp",
|
||||
"//src/mongo/db/commands/server_status:server_status_command_test.cpp",
|
||||
"//src/mongo/db/commands/server_status:server_status_metric_test.cpp",
|
||||
"//src/mongo/db/local_catalog:collection_mock.h",
|
||||
"//src/mongo/db/local_catalog/ddl:create_command_test.cpp",
|
||||
"//src/mongo/db/local_catalog/ddl:list_collections_filter_test.cpp",
|
||||
] + select({
|
||||
|
|
@ -1232,6 +1230,10 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/db/commands/query_cmd:mr_test.cpp",
|
||||
],
|
||||
}),
|
||||
private_hdrs = [
|
||||
":db_command_test_fixture.h",
|
||||
"//src/mongo/db/local_catalog:collection_mock.h",
|
||||
],
|
||||
tags = ["mongo_unittest_fourth_group"],
|
||||
deps = [
|
||||
":cluster_server_parameter_commands_invocation",
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
#include "mongo/db/query/analyze_command_gen.h"
|
||||
#include "mongo/db/query/compiler/stats/scalar_histogram.h"
|
||||
#include "mongo/db/query/compiler/stats/stats_catalog.h"
|
||||
#include "mongo/db/query/compiler/stats/stats_gen.h"
|
||||
#include "mongo/db/query/compiler/stats/stats_for_histograms_gen.h"
|
||||
#include "mongo/db/query/query_feature_flags_gen.h"
|
||||
#include "mongo/db/server_options.h"
|
||||
#include "mongo/db/service_context.h"
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ mongo_cc_library(
|
|||
"//src/mongo/db/query/compiler/physical_model/interval:interval.h",
|
||||
"//src/mongo/db/query/compiler/physical_model/query_solution:query_solution.h",
|
||||
"//src/mongo/db/query/compiler/rewrites/matcher:expression_optimizer.h",
|
||||
"//src/mongo/db/query/compiler/stats:stats_gen_for_histograms",
|
||||
"//src/mongo/db/query/compiler/stats:stats_for_histograms_gen",
|
||||
"//src/mongo/db/query/compiler/stats:value_utils.h",
|
||||
"//src/mongo/db/query/plan_cache:classic_plan_cache.h",
|
||||
"//src/mongo/db/query/plan_cache:plan_cache.h",
|
||||
|
|
|
|||
|
|
@ -108,8 +108,6 @@ mongo_cc_library(
|
|||
"inclusion_projection_executor.cpp",
|
||||
"projection_executor_builder.cpp",
|
||||
"projection_node.cpp",
|
||||
"//src/mongo/base:exact_cast.h",
|
||||
"//src/mongo/db/query/compiler/logical_model/projection:projection_ast_path_tracking_visitor.h",
|
||||
],
|
||||
hdrs = [
|
||||
"add_fields_projection_executor.h",
|
||||
|
|
@ -118,6 +116,10 @@ mongo_cc_library(
|
|||
"projection_executor_builder.h",
|
||||
"projection_node.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/base:exact_cast.h",
|
||||
"//src/mongo/db/query/compiler/logical_model/projection:projection_ast_path_tracking_visitor.h",
|
||||
],
|
||||
deps = [
|
||||
"//src/mongo/db:query_expressions",
|
||||
"//src/mongo/db/matcher:expression_algo",
|
||||
|
|
@ -202,7 +204,6 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/db/exec/expression:evaluate_string_test.cpp",
|
||||
"//src/mongo/db/exec/expression:evaluate_test.cpp",
|
||||
"//src/mongo/db/exec/expression:evaluate_test_helpers.cpp",
|
||||
"//src/mongo/db/exec/expression:evaluate_test_helpers.h",
|
||||
"//src/mongo/db/exec/expression:evaluate_trigonometric_test.cpp",
|
||||
"//src/mongo/db/exec/matcher:matcher_expr_test.cpp",
|
||||
"//src/mongo/db/exec/matcher:matcher_geo_test.cpp",
|
||||
|
|
@ -211,6 +212,9 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/db/exec/matcher:matcher_serialization_test.cpp",
|
||||
"//src/mongo/db/exec/matcher:matcher_test.cpp",
|
||||
"//src/mongo/db/exec/timeseries:bucket_unpacker_test.cpp",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/exec/expression:evaluate_test_helpers.h",
|
||||
"//src/mongo/db/pipeline:document_source_test_optimizations.h",
|
||||
],
|
||||
tags = ["mongo_unittest_fourth_group"],
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ mongo_cc_library(
|
|||
"//src/mongo/db/exec/sbe/vm:vm_datetime.cpp",
|
||||
"//src/mongo/db/exec/sbe/vm:vm_instruction.cpp",
|
||||
"//src/mongo/db/exec/sbe/vm:vm_printer.cpp",
|
||||
"//src/mongo/db/query:multiple_collection_accessor.h",
|
||||
],
|
||||
hdrs = [
|
||||
"sbe_pattern_value_cmp.h",
|
||||
|
|
@ -87,6 +86,7 @@ mongo_cc_library(
|
|||
"//src/mongo/db/exec/sbe/vm:vm_memory.h",
|
||||
"//src/mongo/db/exec/sbe/vm:vm_printer.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/db/query:multiple_collection_accessor.h"],
|
||||
deps = [
|
||||
"//src/mongo:base",
|
||||
"//src/mongo/bson/dotted_path:dotted_path_support",
|
||||
|
|
@ -189,12 +189,6 @@ mongo_cc_library(
|
|||
"//src/mongo/db/exec/sbe/stages:unwind.cpp",
|
||||
"//src/mongo/db/exec/sbe/stages:virtual_scan.cpp",
|
||||
"//src/mongo/db/exec/sbe/stages:window.cpp",
|
||||
"//src/mongo/db/query:explain.h",
|
||||
"//src/mongo/db/query:plan_explainer_sbe.h",
|
||||
"//src/mongo/db/query:plan_ranker.h",
|
||||
"//src/mongo/db/query:sbe_plan_ranker.h",
|
||||
"//src/mongo/db/query/plan_cache:sbe_plan_cache.h",
|
||||
"//src/mongo/db/query/stage_builder/sbe:builder_data.h",
|
||||
],
|
||||
hdrs = [
|
||||
"//src/mongo/db/exec/sbe/stages:agg_project.h",
|
||||
|
|
@ -233,6 +227,14 @@ mongo_cc_library(
|
|||
"//src/mongo/db/query/util:hash_roaring_set.h",
|
||||
"//src/mongo/util:roaring_bitmaps.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/query/plan_cache:sbe_plan_cache.h",
|
||||
"//src/mongo/db/query/stage_builder/sbe:builder_data.h",
|
||||
"//src/mongo/db/query:explain.h",
|
||||
"//src/mongo/db/query:plan_explainer_sbe.h",
|
||||
"//src/mongo/db/query:plan_ranker.h",
|
||||
"//src/mongo/db/query:sbe_plan_ranker.h",
|
||||
],
|
||||
deps = [
|
||||
":query_sbe",
|
||||
":query_sbe_plan_stats",
|
||||
|
|
@ -343,7 +345,6 @@ mongo_cc_unit_test(
|
|||
"sbe_agg_project_test.cpp",
|
||||
"sbe_block_hashagg_test.cpp",
|
||||
"sbe_block_stages_test.cpp",
|
||||
"sbe_block_test_helpers.h",
|
||||
"sbe_code_fragment_test.cpp",
|
||||
"sbe_extract_field_paths_test.cpp",
|
||||
"sbe_filter_test.cpp",
|
||||
|
|
@ -351,7 +352,6 @@ mongo_cc_unit_test(
|
|||
"sbe_hash_agg_test.cpp",
|
||||
"sbe_hash_join_test.cpp",
|
||||
"sbe_hash_lookup_shared_test.cpp",
|
||||
"sbe_hash_lookup_shared_test.h",
|
||||
"sbe_hash_lookup_test.cpp",
|
||||
"sbe_hash_lookup_unwind_test.cpp",
|
||||
"sbe_key_string_test.cpp",
|
||||
|
|
@ -361,10 +361,8 @@ mongo_cc_unit_test(
|
|||
"sbe_merge_join_test.cpp",
|
||||
"sbe_mkobj_test.cpp",
|
||||
"sbe_numeric_convert_test.cpp",
|
||||
"sbe_pattern_value_cmp.h",
|
||||
"sbe_pattern_value_cmp_test.cpp",
|
||||
"sbe_plan_size_test.cpp",
|
||||
"sbe_plan_stage_test.h",
|
||||
"sbe_scan_test.cpp",
|
||||
"sbe_search_cursor_test.cpp",
|
||||
"sbe_sort_test.cpp",
|
||||
|
|
@ -375,7 +373,6 @@ mongo_cc_unit_test(
|
|||
"sbe_unique_test.cpp",
|
||||
"sbe_window_test.cpp",
|
||||
"write_value_to_stream_test.cpp",
|
||||
"//src/mongo/db/exec:shard_filterer_mock.h",
|
||||
"//src/mongo/db/exec/sbe/expressions:sbe_array_set_conversion_test.cpp",
|
||||
"//src/mongo/db/exec/sbe/expressions:sbe_block_expr_test.cpp",
|
||||
"//src/mongo/db/exec/sbe/expressions:sbe_block_top_bottom_test.cpp",
|
||||
|
|
@ -448,11 +445,18 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/db/exec/sbe/values:value_serialization_test.cpp",
|
||||
"//src/mongo/db/exec/sbe/values:value_test.cpp",
|
||||
"//src/mongo/db/exec/sbe/vm:code_fragment_test.cpp",
|
||||
"//src/mongo/db/query/stage_builder/sbe/tests:sbe_builder_test_fixture.h",
|
||||
],
|
||||
data = [
|
||||
"//src/mongo/db/test_output/exec/sbe:test_data",
|
||||
],
|
||||
private_hdrs = [
|
||||
":sbe_block_test_helpers.h",
|
||||
":sbe_hash_lookup_shared_test.h",
|
||||
":sbe_pattern_value_cmp.h",
|
||||
":sbe_plan_stage_test.h",
|
||||
"//src/mongo/db/exec:shard_filterer_mock.h",
|
||||
"//src/mongo/db/query/stage_builder/sbe/tests:sbe_builder_test_fixture.h",
|
||||
],
|
||||
tags = ["mongo_unittest_eighth_group"],
|
||||
deps = [
|
||||
":sbe_plan_stage_test",
|
||||
|
|
|
|||
|
|
@ -4,9 +4,14 @@ package(default_visibility = ["//visibility:public"])
|
|||
|
||||
exports_files([
|
||||
"document_source_extension_test.cpp",
|
||||
"host_portal.h",
|
||||
])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
mongo_cc_library(
|
||||
name = "extension_host",
|
||||
srcs = [
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@ load("//bazel:mongo_src_rules.bzl", "mongo_cc_library")
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
mongo_cc_library(
|
||||
name = "aggregation_stage",
|
||||
srcs = [],
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@ load("//bazel:mongo_src_rules.bzl", "mongo_cc_unit_test")
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
mongo_cc_unit_test(
|
||||
name = "host_aggregation_stage_test",
|
||||
srcs = [
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@ load("//bazel:mongo_src_rules.bzl", "mongo_cc_library", "mongo_cc_unit_test")
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
# Like the C++ SDK, we should do our best to minimize the dependencies of this connector layer so
|
||||
# that it can be mostly self-contained.
|
||||
mongo_cc_library(
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@ load("//bazel:mongo_src_rules.bzl", "mongo_cc_library")
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
mongo_cc_library(
|
||||
name = "aggregation_stage",
|
||||
srcs = [
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@ load("//bazel:mongo_src_rules.bzl", "idl_generator", "mongo_cc_library")
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
mongo_cc_library(
|
||||
name = "extensions_api_public",
|
||||
srcs = [
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
load("//bazel:mongo_src_rules.bzl", "mongo_cc_library")
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
mongo_cc_library(
|
||||
name = "sdk_cpp",
|
||||
srcs = [
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@ load("//bazel:mongo_src_rules.bzl", "idl_generator", "mongo_cc_benchmark", "mong
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
mongo_cc_unit_test(
|
||||
name = "extension_sdk_test",
|
||||
srcs = [
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@ load("//bazel:mongo_src_rules.bzl", "mongo_cc_library")
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
mongo_cc_library(
|
||||
name = "shared",
|
||||
srcs = [
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@ load("//bazel:mongo_src_rules.bzl", "mongo_cc_library")
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
mongo_cc_library(
|
||||
name = "handle",
|
||||
srcs = [],
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@ load("//bazel:mongo_src_rules.bzl", "mongo_cc_unit_test")
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
mongo_cc_unit_test(
|
||||
name = "extension_shared_test",
|
||||
srcs = [
|
||||
|
|
|
|||
|
|
@ -3,6 +3,12 @@ load("//bazel:mongo_src_rules.bzl", "mongo_cc_extension_shared_library")
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
# This sets up the valid extension targets to use in the top level `dist-test`
|
||||
# and `extensions` targets. Using Bazel's transition system, this rule ensures
|
||||
# that the extensions are built with the correct configuration. All extensions
|
||||
|
|
|
|||
|
|
@ -195,10 +195,10 @@ mongo_cc_unit_test(
|
|||
"file_writer_test.cpp",
|
||||
"ftdc_prctl_test.cpp",
|
||||
"ftdc_test.cpp",
|
||||
"ftdc_test.h",
|
||||
"ftdc_util_test.cpp",
|
||||
"metadata_compressor_test.cpp",
|
||||
],
|
||||
private_hdrs = [":ftdc_test.h"],
|
||||
tags = ["mongo_unittest_second_group"],
|
||||
deps = [
|
||||
":ftdc",
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ mongo_cc_library(
|
|||
"hash.cpp",
|
||||
"r2_region_coverer.cpp",
|
||||
"shapes.cpp",
|
||||
"//src/mongo/util/transitional_tools_do_not_use:vector_spooling.h",
|
||||
],
|
||||
hdrs = [
|
||||
"big_polygon.h",
|
||||
|
|
@ -25,6 +24,7 @@ mongo_cc_library(
|
|||
"r2_region_coverer.h",
|
||||
"shapes.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/util/transitional_tools_do_not_use:vector_spooling.h"],
|
||||
deps = [
|
||||
"//src/mongo:base", # TODO(SERVER-93876): Remove.
|
||||
"//src/mongo/db:common",
|
||||
|
|
|
|||
|
|
@ -1,53 +0,0 @@
|
|||
# Copyright (C) 2023-present MongoDB, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the Server Side Public License, version 1,
|
||||
# as published by MongoDB, Inc.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# Server Side Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the Server Side Public License
|
||||
# along with this program. If not, see
|
||||
# <http://www.mongodb.com/licensing/server-side-public-license>.
|
||||
#
|
||||
# As a special exception, the copyright holders give permission to link the
|
||||
# code of portions of this program with the OpenSSL library under certain
|
||||
# conditions as described in each individual source file and distribute
|
||||
# linked combinations including the program with the OpenSSL library. You
|
||||
# must comply with the Server Side Public License in all respects for
|
||||
# all of the code used other than as permitted herein. If you modify file(s)
|
||||
# with this exception, you may extend this exception to your version of the
|
||||
# file(s), but you are not obligated to do so. If you do not wish to do so,
|
||||
# delete this exception statement from your version. If you delete this
|
||||
# exception statement from all source files in the program, then also delete
|
||||
# it in the license file.
|
||||
#
|
||||
|
||||
global:
|
||||
cpp_namespace: "mongo"
|
||||
|
||||
imports:
|
||||
- "mongo/db/basic_types.idl"
|
||||
|
||||
commands:
|
||||
clusterResetPlacementHistory:
|
||||
command_name: resetPlacementHistory
|
||||
cpp_name: ClusterResetPlacementHistory
|
||||
description:
|
||||
"Admin command to reinitialize the content of config.placementHistory
|
||||
based on the current state of the Sharding catalog."
|
||||
namespace: ignored
|
||||
api_version: ""
|
||||
strict: false
|
||||
|
||||
_configsvrResetPlacementHistory:
|
||||
command_name: _configsvrResetPlacementHistory
|
||||
cpp_name: ConfigsvrResetPlacementHistory
|
||||
description: "Definition of the resetPlacementHistory command called
|
||||
from routers on the config server."
|
||||
namespace: ignored
|
||||
api_version: ""
|
||||
strict: false
|
||||
|
|
@ -65,7 +65,6 @@ mongo_cc_library(
|
|||
"wildcard_key_generator.cpp",
|
||||
"wildcard_validation.cpp",
|
||||
"//src/mongo/db/local_catalog:index_descriptor.cpp",
|
||||
"//src/mongo/db/storage/kv:kv_engine.h",
|
||||
],
|
||||
hdrs = [
|
||||
"2d_access_method.h",
|
||||
|
|
@ -88,6 +87,7 @@ mongo_cc_library(
|
|||
"//src/mongo/db/exec:index_path_projection.h",
|
||||
"//src/mongo/db/local_catalog:index_descriptor.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/db/storage/kv:kv_engine.h"],
|
||||
deps = [
|
||||
":expression_params",
|
||||
":multikey_paths",
|
||||
|
|
|
|||
|
|
@ -195,7 +195,6 @@ mongo_cc_library(
|
|||
"index_build_interceptor.cpp",
|
||||
"skipped_record_tracker.cpp",
|
||||
":index_build_interceptor_gen",
|
||||
"//src/mongo/db/index:index_access_method.h",
|
||||
],
|
||||
hdrs = [
|
||||
"duplicate_key_tracker.h",
|
||||
|
|
@ -203,6 +202,7 @@ mongo_cc_library(
|
|||
"skipped_record_tracker.h",
|
||||
],
|
||||
no_undefined_ref_DO_NOT_USE = False,
|
||||
private_hdrs = ["//src/mongo/db/index:index_access_method.h"],
|
||||
deps = [
|
||||
":index_builds_common",
|
||||
":two_phase_index_build_knobs_idl",
|
||||
|
|
|
|||
|
|
@ -11,12 +11,10 @@ exports_files(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "index_catalog_mock",
|
||||
srcs = [
|
||||
"index_catalog_entry_mock.h",
|
||||
],
|
||||
hdrs = [
|
||||
"index_catalog_mock.h",
|
||||
],
|
||||
private_hdrs = [":index_catalog_entry_mock.h"],
|
||||
deps = [
|
||||
],
|
||||
)
|
||||
|
|
@ -61,7 +59,6 @@ mongo_cc_library(
|
|||
"collection_options.cpp",
|
||||
"collection_options_gen",
|
||||
"collection_options_validation.cpp",
|
||||
"//src/mongo/db/local_catalog/ddl:create_command_validation.h",
|
||||
],
|
||||
hdrs = [
|
||||
"clustered_collection_util.h",
|
||||
|
|
@ -69,6 +66,7 @@ mongo_cc_library(
|
|||
"collection_options_validation.h",
|
||||
"//src/mongo/db/index:index_constants.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/db/local_catalog/ddl:create_command_validation.h"],
|
||||
deps = [
|
||||
# TODO(SERVER-93876): Technically only requires `//src/mongo/db:common`.
|
||||
"//src/mongo/crypto:encrypted_field_config",
|
||||
|
|
@ -484,7 +482,6 @@ mongo_cc_library(
|
|||
"rename_collection.cpp",
|
||||
"unique_collection_name.cpp",
|
||||
"//src/mongo/db/collection_crud:capped_utils.cpp",
|
||||
"//src/mongo/db/op_observer:batched_write_policy.h",
|
||||
],
|
||||
hdrs = [
|
||||
"backwards_compatible_collection_options_util.h",
|
||||
|
|
@ -502,6 +499,7 @@ mongo_cc_library(
|
|||
"unique_collection_name.h",
|
||||
"//src/mongo/db/collection_crud:capped_utils.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/db/op_observer:batched_write_policy.h"],
|
||||
deps = [
|
||||
":cannot_convert_index_to_unique_info",
|
||||
":collection_options",
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ mongo_cc_library(
|
|||
"fill_locker_info.cpp",
|
||||
"lock_manager.cpp",
|
||||
"lock_manager_defs.cpp",
|
||||
"lock_request_list.h",
|
||||
"lock_stats.cpp",
|
||||
"locker.cpp",
|
||||
"resource_catalog.cpp",
|
||||
|
|
@ -57,6 +56,7 @@ mongo_cc_library(
|
|||
"resource_catalog.h",
|
||||
],
|
||||
no_undefined_ref_DO_NOT_USE = False,
|
||||
private_hdrs = [":lock_request_list.h"],
|
||||
deps = [
|
||||
":flow_control_ticketholder",
|
||||
"//src/mongo/db:server_base",
|
||||
|
|
@ -131,11 +131,11 @@ mongo_cc_unit_test(
|
|||
"fast_map_noalloc_test.cpp",
|
||||
"fill_locker_info_test.cpp",
|
||||
"lock_manager_test.cpp",
|
||||
"lock_manager_test_help.h",
|
||||
"lock_stats_test.cpp",
|
||||
"locker_test.cpp",
|
||||
"resource_catalog_test.cpp",
|
||||
],
|
||||
private_hdrs = [":lock_manager_test_help.h"],
|
||||
tags = ["mongo_unittest_sixth_group"],
|
||||
deps = [
|
||||
":exception_util",
|
||||
|
|
|
|||
|
|
@ -97,11 +97,11 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/db/matcher/schema:expression_internal_schema_unique_items_test.cpp",
|
||||
"//src/mongo/db/matcher/schema:expression_internal_schema_xor_test.cpp",
|
||||
"//src/mongo/db/matcher/schema:json_pointer_test.cpp",
|
||||
"//src/mongo/db/query/compiler/rewrites/boolean_simplification:bitset_test_util.h",
|
||||
],
|
||||
data = [
|
||||
"//src/mongo/db/test_output/matcher/debug_string_test:test_data",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/db/query/compiler/rewrites/boolean_simplification:bitset_test_util.h"],
|
||||
tags = ["mongo_unittest_first_group"],
|
||||
deps = [
|
||||
":expression_algo",
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ mongo_cc_unit_test(
|
|||
srcs = [
|
||||
"doc_validation_error_json_schema_test.cpp",
|
||||
"doc_validation_error_test.cpp",
|
||||
"doc_validation_error_test.h",
|
||||
],
|
||||
private_hdrs = [":doc_validation_error_test.h"],
|
||||
tags = ["mongo_unittest_fourth_group"],
|
||||
deps = [
|
||||
":doc_validation",
|
||||
|
|
|
|||
|
|
@ -128,13 +128,6 @@ mongo_cc_library(
|
|||
"resume_token.cpp",
|
||||
"resume_token_gen",
|
||||
"storage_stats_spec_gen",
|
||||
"//src/mongo/db:read_concern.h",
|
||||
"//src/mongo/db/exec:exclusion_projection_executor.h",
|
||||
"//src/mongo/db/exec:fastpath_projection_node.h",
|
||||
"//src/mongo/db/exec:projection_executor.h",
|
||||
"//src/mongo/db/exec:projection_node.h",
|
||||
"//src/mongo/db/local_catalog:catalog_raii.h",
|
||||
"//src/mongo/db/local_catalog:db_raii.h",
|
||||
"//src/mongo/db/pipeline:document_source_coll_stats_gen",
|
||||
"//src/mongo/db/pipeline:document_source_internal_all_collection_stats_gen",
|
||||
"//src/mongo/db/pipeline:document_source_list_cluster_catalog_gen",
|
||||
|
|
@ -142,8 +135,6 @@ mongo_cc_library(
|
|||
"//src/mongo/db/pipeline/search:document_source_list_search_indexes_gen",
|
||||
"//src/mongo/db/pipeline/search:document_source_list_search_indexes_validator.cpp",
|
||||
"//src/mongo/db/pipeline/search:plan_sharded_search_gen",
|
||||
"//src/mongo/db/stats:operation_latency_histogram.h",
|
||||
"//src/mongo/db/stats:top.h",
|
||||
],
|
||||
hdrs = [
|
||||
"change_stream.h",
|
||||
|
|
@ -168,6 +159,17 @@ mongo_cc_library(
|
|||
"//src/mongo/db/local_catalog:virtual_collection_options.h",
|
||||
"//src/mongo/db/pipeline/search:document_source_list_search_indexes_validator.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/exec:exclusion_projection_executor.h",
|
||||
"//src/mongo/db/exec:fastpath_projection_node.h",
|
||||
"//src/mongo/db/exec:projection_executor.h",
|
||||
"//src/mongo/db/exec:projection_node.h",
|
||||
"//src/mongo/db/local_catalog:catalog_raii.h",
|
||||
"//src/mongo/db/local_catalog:db_raii.h",
|
||||
"//src/mongo/db/stats:operation_latency_histogram.h",
|
||||
"//src/mongo/db/stats:top.h",
|
||||
"//src/mongo/db:read_concern.h",
|
||||
],
|
||||
deps = [
|
||||
":docs_needed_bounds", # TODO(SERVER-93876): Remove.
|
||||
":runtime_constants_idl",
|
||||
|
|
@ -282,7 +284,6 @@ mongo_cc_library(
|
|||
name = "aggregation_request_helper",
|
||||
srcs = [
|
||||
"aggregation_request_helper.cpp",
|
||||
"name_expression.h",
|
||||
"name_expression_parser.cpp",
|
||||
"query_request_conversion.cpp",
|
||||
":aggregate_command_gen",
|
||||
|
|
@ -293,6 +294,7 @@ mongo_cc_library(
|
|||
"aggregation_request_helper.h",
|
||||
"query_request_conversion.h",
|
||||
],
|
||||
private_hdrs = [":name_expression.h"],
|
||||
deps = [
|
||||
":document_sources_idl",
|
||||
"//src/mongo/db:server_base",
|
||||
|
|
@ -1290,8 +1292,6 @@ mongo_cc_library(
|
|||
"//src/mongo/db/exec/agg:change_stream_split_large_event_stage.cpp",
|
||||
"//src/mongo/db/exec/agg:change_stream_transform_stage.cpp",
|
||||
"//src/mongo/db/exec/agg:change_stream_unwind_transaction_stage.cpp",
|
||||
"//src/mongo/db/query/bson:bson_helper.h",
|
||||
"//src/mongo/db/transaction:transaction_history_iterator.h",
|
||||
],
|
||||
hdrs = [
|
||||
"change_stream_document_diff_parser.h",
|
||||
|
|
@ -1327,6 +1327,10 @@ mongo_cc_library(
|
|||
"//src/mongo/db/exec/agg:change_stream_transform_stage.h",
|
||||
"//src/mongo/db/exec/agg:change_stream_unwind_transaction_stage.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/query/bson:bson_helper.h",
|
||||
"//src/mongo/db/transaction:transaction_history_iterator.h",
|
||||
],
|
||||
deps = [
|
||||
":change_stream_helpers",
|
||||
":change_stream_interfaces",
|
||||
|
|
@ -1465,8 +1469,8 @@ mongo_cc_library(
|
|||
"document_source_mock.cpp",
|
||||
"//src/mongo/db/exec/agg:mock_stage.cpp",
|
||||
"//src/mongo/db/pipeline/process_interface:stub_lookup_single_document_process_interface.cpp",
|
||||
"//src/mongo/db/pipeline/process_interface:stub_lookup_single_document_process_interface.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/db/pipeline/process_interface:stub_lookup_single_document_process_interface.h"],
|
||||
deps = [
|
||||
":expression_context_for_test",
|
||||
":pipeline",
|
||||
|
|
@ -1478,21 +1482,15 @@ mongo_cc_unit_test(
|
|||
name = "db_pipeline_test",
|
||||
srcs = [
|
||||
"accumulator_test.cpp",
|
||||
"aggregation_mongod_context_fixture.h",
|
||||
"aggregation_request_test.cpp",
|
||||
"change_stream_document_diff_parser_test.cpp",
|
||||
"change_stream_event_transform_test.cpp",
|
||||
"change_stream_reader_builder_mock.h",
|
||||
"change_stream_reader_builder_test.cpp",
|
||||
"change_stream_reader_context_mock.h",
|
||||
"change_stream_rewrites_test.cpp",
|
||||
"change_stream_shard_targeter_mock.h",
|
||||
"change_stream_shard_targeter_test.cpp",
|
||||
"change_stream_split_event_helpers_test.cpp",
|
||||
"change_stream_stage_test_fixture.cpp",
|
||||
"change_stream_stage_test_fixture.h",
|
||||
"change_stream_test.cpp",
|
||||
"data_to_shards_allocation_query_service_mock.h",
|
||||
"data_to_shards_allocation_query_service_test.cpp",
|
||||
"dependencies_test.cpp",
|
||||
"dispatch_shard_pipeline_test.cpp",
|
||||
|
|
@ -1547,7 +1545,6 @@ mongo_cc_unit_test(
|
|||
"document_source_sort_by_count_test.cpp",
|
||||
"document_source_sort_test.cpp",
|
||||
"document_source_test.cpp",
|
||||
"document_source_test_optimizations.h",
|
||||
"document_source_union_with_test.cpp",
|
||||
"document_source_unwind_test.cpp",
|
||||
"expression_and_test.cpp",
|
||||
|
|
@ -1577,11 +1574,9 @@ mongo_cc_unit_test(
|
|||
"field_path_test.cpp",
|
||||
"granularity_rounder_powers_of_two_test.cpp",
|
||||
"granularity_rounder_preferred_numbers_test.cpp",
|
||||
"historical_placement_fetcher_mock.h",
|
||||
"lookup_set_cache_test.cpp",
|
||||
"monotonic_expression_test.cpp",
|
||||
"partition_key_comparator_test.cpp",
|
||||
"pipeline_metadata_tree.h",
|
||||
"pipeline_metadata_tree_test.cpp",
|
||||
"pipeline_test.cpp",
|
||||
"plan_executor_pipeline_test.cpp",
|
||||
|
|
@ -1589,7 +1584,6 @@ mongo_cc_unit_test(
|
|||
"semantic_analysis_test.cpp",
|
||||
"sequential_document_cache_test.cpp",
|
||||
"serverless_aggregation_context_fixture.cpp",
|
||||
"serverless_aggregation_context_fixture.h",
|
||||
"sharded_agg_helpers_test.cpp",
|
||||
"sharded_union_test.cpp",
|
||||
"skip_and_limit_test.cpp",
|
||||
|
|
@ -1604,7 +1598,6 @@ mongo_cc_unit_test(
|
|||
}) + [
|
||||
"//src/mongo/db/exec/agg:document_source_to_stage_registry_test.cpp",
|
||||
"//src/mongo/db/extension/host:document_source_extension_test.cpp",
|
||||
"//src/mongo/db/local_catalog:collection_mock.h",
|
||||
"//src/mongo/db/pipeline:document_source_coll_stats_test.cpp",
|
||||
"//src/mongo/db/pipeline:document_source_internal_all_collection_stats_test.cpp",
|
||||
"//src/mongo/db/pipeline/document_source_internal_unpack_bucket_test:create_predicates_on_bucket_level_field_test.cpp",
|
||||
|
|
@ -1622,7 +1615,6 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/db/pipeline/document_source_internal_unpack_bucket_test:split_match_on_meta_and_rename_test.cpp",
|
||||
"//src/mongo/db/pipeline/document_source_internal_unpack_bucket_test:top_k_sort_optimization_test.cpp",
|
||||
"//src/mongo/db/pipeline/document_source_internal_unpack_bucket_test:unpack_bucket_exec_test.cpp",
|
||||
"//src/mongo/db/pipeline/process_interface:standalone_process_interface.h",
|
||||
"//src/mongo/db/pipeline/search:document_source_internal_search_id_lookup_test.cpp",
|
||||
"//src/mongo/db/pipeline/search:document_source_internal_search_mongot_remote_test.cpp",
|
||||
"//src/mongo/db/pipeline/search:document_source_list_search_indexes_test.cpp",
|
||||
|
|
@ -1652,14 +1644,28 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/db/pipeline/window_function:window_function_set_union_test.cpp",
|
||||
"//src/mongo/db/pipeline/window_function:window_function_std_dev_test.cpp",
|
||||
"//src/mongo/db/pipeline/window_function:window_function_sum_test.cpp",
|
||||
"//src/mongo/db/sharding_environment:sharding_mongod_test_fixture.h",
|
||||
"//src/mongo/dbtests:dbtests.h",
|
||||
"//src/mongo/s/query/exec:document_source_merge_cursors_test.cpp",
|
||||
"//src/mongo/s/query/exec:sharded_agg_test_fixture.h",
|
||||
],
|
||||
minimum_test_resources = {
|
||||
"cpu_cores": 2,
|
||||
},
|
||||
private_hdrs = [
|
||||
":aggregation_mongod_context_fixture.h",
|
||||
":change_stream_reader_builder_mock.h",
|
||||
":change_stream_reader_context_mock.h",
|
||||
":change_stream_shard_targeter_mock.h",
|
||||
":change_stream_stage_test_fixture.h",
|
||||
":data_to_shards_allocation_query_service_mock.h",
|
||||
":document_source_test_optimizations.h",
|
||||
":historical_placement_fetcher_mock.h",
|
||||
":pipeline_metadata_tree.h",
|
||||
":serverless_aggregation_context_fixture.h",
|
||||
"//src/mongo/db/local_catalog:collection_mock.h",
|
||||
"//src/mongo/db/pipeline/process_interface:standalone_process_interface.h",
|
||||
"//src/mongo/db/sharding_environment:sharding_mongod_test_fixture.h",
|
||||
"//src/mongo/dbtests:dbtests.h",
|
||||
"//src/mongo/s/query/exec:sharded_agg_test_fixture.h",
|
||||
],
|
||||
tags = [
|
||||
# Trying to access /data/db/ is incompatible with the sandbox
|
||||
"code_coverage_quarantine",
|
||||
|
|
@ -1781,10 +1787,8 @@ mongo_cc_benchmark(
|
|||
|
||||
mongo_cc_benchmark(
|
||||
name = "percentile_algo_bm",
|
||||
srcs = [
|
||||
"percentile_algo_bm_fixture.cpp",
|
||||
"percentile_algo_bm_fixture.h",
|
||||
],
|
||||
srcs = ["percentile_algo_bm_fixture.cpp"],
|
||||
private_hdrs = [":percentile_algo_bm_fixture.h"],
|
||||
tags = ["query_bm"],
|
||||
deps = [
|
||||
":accumulator",
|
||||
|
|
@ -1795,10 +1799,8 @@ mongo_cc_benchmark(
|
|||
|
||||
mongo_cc_benchmark(
|
||||
name = "window_function_percentile_bm",
|
||||
srcs = [
|
||||
"//src/mongo/db/pipeline/window_function:window_function_percentile_bm_fixture.cpp",
|
||||
"//src/mongo/db/pipeline/window_function:window_function_percentile_bm_fixture.h",
|
||||
],
|
||||
srcs = ["//src/mongo/db/pipeline/window_function:window_function_percentile_bm_fixture.cpp"],
|
||||
private_hdrs = ["//src/mongo/db/pipeline/window_function:window_function_percentile_bm_fixture.h"],
|
||||
tags = ["query_bm"],
|
||||
deps = [
|
||||
":accumulator",
|
||||
|
|
@ -1811,10 +1813,8 @@ mongo_cc_benchmark(
|
|||
|
||||
mongo_cc_benchmark(
|
||||
name = "window_function_concat_arrays_bm",
|
||||
srcs = [
|
||||
"//src/mongo/db/pipeline/window_function:window_function_concat_arrays_bm_fixture.cpp",
|
||||
"//src/mongo/db/pipeline/window_function:window_function_concat_arrays_bm_fixture.h",
|
||||
],
|
||||
srcs = ["//src/mongo/db/pipeline/window_function:window_function_concat_arrays_bm_fixture.cpp"],
|
||||
private_hdrs = ["//src/mongo/db/pipeline/window_function:window_function_concat_arrays_bm_fixture.h"],
|
||||
tags = ["query_bm"],
|
||||
deps = [
|
||||
":accumulator",
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#include "mongo/db/memory_tracking/memory_usage_tracker.h"
|
||||
#include "mongo/db/pipeline/expression.h"
|
||||
#include "mongo/db/pipeline/expression_context.h"
|
||||
#include "mongo/db/query/compiler/stats/stats_gen.h"
|
||||
#include "mongo/db/query/compiler/stats/stats_for_histograms_gen.h"
|
||||
#include "mongo/db/query/compiler/stats/value_utils.h"
|
||||
#include "mongo/db/query/query_shape/serialization_options.h"
|
||||
#include "mongo/platform/decimal128.h"
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
#include "mongo/db/query/allowed_contexts.h"
|
||||
#include "mongo/db/query/compiler/stats/ce_histogram.h"
|
||||
#include "mongo/db/query/compiler/stats/max_diff.h"
|
||||
#include "mongo/db/query/compiler/stats/stats_gen.h"
|
||||
#include "mongo/db/query/compiler/stats/stats_for_histograms_gen.h"
|
||||
#include "mongo/db/query/compiler/stats/value_utils.h"
|
||||
#include "mongo/idl/idl_parser.h"
|
||||
#include "mongo/logv2/log.h"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@ load("//bazel:mongo_src_rules.bzl", "mongo_cc_library", "mongo_cc_unit_test")
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
mongo_cc_library(
|
||||
name = "pipeline_rewriter",
|
||||
srcs = [
|
||||
|
|
|
|||
|
|
@ -356,8 +356,8 @@ mongo_cc_unit_test(
|
|||
srcs = [
|
||||
"mongos_process_interface_test.cpp",
|
||||
"shardsvr_process_interface_test.cpp",
|
||||
"//src/mongo/s/query/exec:sharded_agg_test_fixture.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/s/query/exec:sharded_agg_test_fixture.h"],
|
||||
tags = ["mongo_unittest_first_group"],
|
||||
deps = [
|
||||
":mongos_process_interface",
|
||||
|
|
@ -376,10 +376,8 @@ mongo_cc_unit_test(
|
|||
|
||||
mongo_cc_unit_test(
|
||||
name = "standalone_process_interface_test",
|
||||
srcs = [
|
||||
"standalone_process_interface.h",
|
||||
"standalone_process_interface_test.cpp",
|
||||
],
|
||||
srcs = ["standalone_process_interface_test.cpp"],
|
||||
private_hdrs = [":standalone_process_interface.h"],
|
||||
tags = ["mongo_unittest_fourth_group"],
|
||||
deps = [
|
||||
":mongod_process_interfaces",
|
||||
|
|
|
|||
|
|
@ -35,13 +35,11 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "canonical_distinct",
|
||||
srcs = [
|
||||
"canonical_distinct.cpp",
|
||||
"//src/mongo/db/pipeline:document_source_replace_root.h",
|
||||
],
|
||||
srcs = ["canonical_distinct.cpp"],
|
||||
hdrs = [
|
||||
"canonical_distinct.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/db/pipeline:document_source_replace_root.h"],
|
||||
deps = [
|
||||
"//src/mongo:base",
|
||||
"//src/mongo/db:commands",
|
||||
|
|
@ -350,8 +348,8 @@ mongo_cc_library(
|
|||
"sampling_ce_method.cpp",
|
||||
"sampling_confidence_interval.cpp",
|
||||
"sbe_hashAgg_increased_spilling_mode.cpp",
|
||||
"//src/mongo/db/query/query_stats:rate_limiting.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/db/query/query_stats:rate_limiting.h"],
|
||||
deps = [
|
||||
":on_parameter_change_updaters",
|
||||
"//src/mongo/db:server_base",
|
||||
|
|
@ -410,7 +408,6 @@ mongo_cc_library(
|
|||
"//src/mongo/db/query/plan_enumerator:enumerator_memo.cpp",
|
||||
"//src/mongo/db/query/plan_enumerator:memo_prune.cpp",
|
||||
"//src/mongo/db/query/plan_enumerator:plan_enumerator.cpp",
|
||||
"//src/mongo/util:map_utils.h",
|
||||
],
|
||||
hdrs = [
|
||||
"distinct_access.h",
|
||||
|
|
@ -429,6 +426,7 @@ mongo_cc_library(
|
|||
"//src/mongo/db/query/plan_enumerator:memo_prune.h",
|
||||
"//src/mongo/db/query/plan_enumerator:plan_enumerator.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/util:map_utils.h"],
|
||||
deps = [
|
||||
"//src/mongo/db:query_expressions",
|
||||
"//src/mongo/db/commands/server_status:server_status_core",
|
||||
|
|
@ -496,8 +494,6 @@ mongo_cc_library(
|
|||
"count_command_gen",
|
||||
"count_request.cpp",
|
||||
"view_response_formatter.cpp",
|
||||
"//src/mongo/db/query/client_cursor:clientcursor.h",
|
||||
"//src/mongo/db/query/client_cursor:cursor_id.h",
|
||||
"//src/mongo/db/query/client_cursor:cursor_response.cpp",
|
||||
"//src/mongo/db/query/client_cursor:kill_cursors_gen",
|
||||
"//src/mongo/db/query/client_cursor:release_memory_gen",
|
||||
|
|
@ -507,6 +503,10 @@ mongo_cc_library(
|
|||
"view_response_formatter.h",
|
||||
"//src/mongo/db/query/client_cursor:cursor_response.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/query/client_cursor:clientcursor.h",
|
||||
"//src/mongo/db/query/client_cursor:cursor_id.h",
|
||||
],
|
||||
deps = [
|
||||
"//src/mongo:core_headers_library",
|
||||
"//src/mongo/db:server_base",
|
||||
|
|
@ -715,12 +715,14 @@ mongo_cc_unit_test(
|
|||
"query_planner_text_test.cpp",
|
||||
"query_planner_tree_test.cpp",
|
||||
"query_planner_wildcard_index_test.cpp",
|
||||
"wildcard_test_utils.h",
|
||||
"//src/mongo/db/query/util:cartesian_product.h",
|
||||
],
|
||||
data = [
|
||||
"//src/mongo/db/query/test_output/query_planner_i_x_select_test:test_data",
|
||||
],
|
||||
private_hdrs = [
|
||||
":wildcard_test_utils.h",
|
||||
"//src/mongo/db/query/util:cartesian_product.h",
|
||||
],
|
||||
tags = [
|
||||
"mongo_unittest_first_group",
|
||||
],
|
||||
|
|
@ -774,8 +776,8 @@ mongo_cc_unit_test(
|
|||
"query_utils_test.cpp",
|
||||
"record_id_range_test.cpp",
|
||||
"view_response_formatter_test.cpp",
|
||||
"wildcard_test_utils.h",
|
||||
],
|
||||
private_hdrs = [":wildcard_test_utils.h"],
|
||||
tags = [
|
||||
"mongo_unittest_fifth_group",
|
||||
],
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ exports_files(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "algebra",
|
||||
srcs = [
|
||||
"operator.h",
|
||||
"polyvalue.h",
|
||||
private_hdrs = [
|
||||
":operator.h",
|
||||
":polyvalue.h",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -107,8 +107,8 @@ mongo_cc_unit_test(
|
|||
"collator_factory_mock_test.cpp",
|
||||
"collator_interface_icu_test.cpp",
|
||||
"collator_interface_mock_test.cpp",
|
||||
"//src/mongo/bson:bsonobj_comparator.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/bson:bsonobj_comparator.h"],
|
||||
tags = ["mongo_unittest_fourth_group"],
|
||||
deps = [
|
||||
":collator_factory_mock",
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ mongo_cc_library(
|
|||
name = "projection_ast",
|
||||
srcs = [
|
||||
"projection.cpp",
|
||||
"projection_ast_path_tracking_visitor.h",
|
||||
"projection_ast_util.cpp",
|
||||
"projection_parser.cpp",
|
||||
],
|
||||
|
|
@ -26,6 +25,7 @@ mongo_cc_library(
|
|||
"//src/mongo/base:exact_cast.h",
|
||||
"//src/mongo/db/query/compiler/rewrites/matcher:expression_optimizer.h",
|
||||
],
|
||||
private_hdrs = [":projection_ast_path_tracking_visitor.h"],
|
||||
deps = [
|
||||
"//src/mongo/db:query_expressions",
|
||||
"//src/mongo/db:server_base",
|
||||
|
|
|
|||
|
|
@ -145,9 +145,9 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "plan_ranking_utils",
|
||||
srcs = [
|
||||
"//src/mongo/db/query/compiler/optimizer/cost_based_ranker:plan_ranking_utils.cpp",
|
||||
"//src/mongo/db/query/compiler/optimizer/cost_based_ranker:plan_ranking_utils.h",
|
||||
srcs = ["//src/mongo/db/query/compiler/optimizer/cost_based_ranker:plan_ranking_utils.cpp"],
|
||||
private_hdrs = [
|
||||
":plan_ranking_utils.h",
|
||||
"//src/mongo/dbtests:dbtests.h",
|
||||
],
|
||||
deps = [
|
||||
|
|
|
|||
|
|
@ -40,9 +40,7 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "index_bounds_builder_test_fixture",
|
||||
srcs = [
|
||||
"index_bounds_builder_test_fixture.h",
|
||||
],
|
||||
private_hdrs = [":index_bounds_builder_test_fixture.h"],
|
||||
deps = [
|
||||
":index_bounds_builder",
|
||||
"//src/mongo/db/pipeline:expression_context_for_test",
|
||||
|
|
|
|||
|
|
@ -9,6 +9,12 @@ exports_files([
|
|||
"single_table_access.h",
|
||||
])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
mongo_cc_library(
|
||||
name = "join_ordering",
|
||||
srcs = [
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@ load("//bazel:mongo_src_rules.bzl", "mongo_cc_library", "mongo_cc_unit_test")
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
mongo_cc_library(
|
||||
name = "json_schema_parser",
|
||||
srcs = [
|
||||
|
|
@ -26,13 +32,13 @@ mongo_cc_unit_test(
|
|||
name = "json_schema_parser_test",
|
||||
srcs = [
|
||||
"array_keywords_test.cpp",
|
||||
"assert_serializes_to.h",
|
||||
"encrypt_keyword_test.cpp",
|
||||
"encrypt_schema_types_parser_test.cpp",
|
||||
"logical_keywords_test.cpp",
|
||||
"object_keywords_test.cpp",
|
||||
"scalar_keywords_test.cpp",
|
||||
],
|
||||
private_hdrs = [":assert_serializes_to.h"],
|
||||
tags = ["mongo_unittest_third_group"],
|
||||
deps = [
|
||||
":json_schema_parser",
|
||||
|
|
|
|||
|
|
@ -35,11 +35,11 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_unit_test(
|
||||
name = "query_solution_test",
|
||||
srcs = [
|
||||
"query_solution_test.cpp",
|
||||
srcs = ["query_solution_test.cpp"],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/query/collation:collator_interface_mock.h",
|
||||
"//src/mongo/db/query:query_test_service_context.h",
|
||||
"//src/mongo/db/query:wildcard_test_utils.h",
|
||||
"//src/mongo/db/query/collation:collator_interface_mock.h",
|
||||
],
|
||||
tags = ["mongo_unittest_sixth_group"],
|
||||
deps = [
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@ load("//bazel:mongo_src_rules.bzl", "mongo_cc_library", "mongo_cc_unit_test")
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
mongo_cc_library(
|
||||
name = "rule_based_rewriter",
|
||||
srcs = [],
|
||||
|
|
|
|||
|
|
@ -16,9 +16,6 @@ mongo_cc_library(
|
|||
"bitset_tree.cpp",
|
||||
"petrick.cpp",
|
||||
"quine_mccluskey.cpp",
|
||||
"//src/mongo/util:dynamic_bitset.h",
|
||||
"//src/mongo/util:inlined_storage.h",
|
||||
"//src/mongo/util:stream_utils.h",
|
||||
],
|
||||
hdrs = [
|
||||
"bitset_algebra.h",
|
||||
|
|
@ -26,6 +23,11 @@ mongo_cc_library(
|
|||
"petrick.h",
|
||||
"quine_mccluskey.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/util:dynamic_bitset.h",
|
||||
"//src/mongo/util:inlined_storage.h",
|
||||
"//src/mongo/util:stream_utils.h",
|
||||
],
|
||||
deps = [
|
||||
"//src/mongo/db:mongohasher",
|
||||
],
|
||||
|
|
@ -35,11 +37,11 @@ mongo_cc_unit_test(
|
|||
name = "boolean_simplification_test",
|
||||
srcs = [
|
||||
"bitset_algebra_test.cpp",
|
||||
"bitset_test_util.h",
|
||||
"bitset_tree_test.cpp",
|
||||
"petrick_test.cpp",
|
||||
"quine_mccluskey_test.cpp",
|
||||
],
|
||||
private_hdrs = [":bitset_test_util.h"],
|
||||
tags = ["mongo_unittest_sixth_group"],
|
||||
deps = [
|
||||
":boolean_simplification",
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ mongo_cc_unit_test(
|
|||
"expression_restorer_test.cpp",
|
||||
"expression_simplifier_test.cpp",
|
||||
"rewrite_expr_test.cpp",
|
||||
"//src/mongo/db/query/compiler/rewrites/boolean_simplification:bitset_test_util.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/db/query/compiler/rewrites/boolean_simplification:bitset_test_util.h"],
|
||||
tags = ["mongo_unittest_first_group"],
|
||||
deps = [
|
||||
":matcher_rewrites",
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ exports_files(
|
|||
)
|
||||
|
||||
idl_generator(
|
||||
name = "stats_gen_for_histograms",
|
||||
src = "stats.idl",
|
||||
name = "stats_for_histograms_gen",
|
||||
src = "stats_for_histograms.idl",
|
||||
deps = [
|
||||
"//src/mongo/db:basic_types_gen",
|
||||
],
|
||||
|
|
@ -23,7 +23,7 @@ mongo_cc_library(
|
|||
"ce_histogram.cpp",
|
||||
"scalar_histogram.cpp",
|
||||
"value_utils.cpp",
|
||||
":stats_gen_for_histograms",
|
||||
":stats_for_histograms_gen",
|
||||
],
|
||||
hdrs = [
|
||||
"ce_histogram.h",
|
||||
|
|
@ -150,9 +150,9 @@ mongo_cc_unit_test(
|
|||
name = "stats_cache_test",
|
||||
srcs = [
|
||||
"stats_cache_loader_mock.cpp",
|
||||
"stats_cache_loader_mock.h",
|
||||
"stats_cache_test.cpp",
|
||||
],
|
||||
private_hdrs = [":stats_cache_loader_mock.h"],
|
||||
tags = ["mongo_unittest_eighth_group"],
|
||||
deps = [
|
||||
":stats",
|
||||
|
|
@ -230,8 +230,8 @@ mongo_cc_unit_test(
|
|||
srcs = [
|
||||
"stats_cache_loader_test.cpp",
|
||||
"stats_cache_loader_test_fixture.cpp",
|
||||
"stats_cache_loader_test_fixture.h",
|
||||
],
|
||||
private_hdrs = [":stats_cache_loader_test_fixture.h"],
|
||||
tags = ["mongo_unittest_eighth_group"],
|
||||
deps = [
|
||||
"//src/mongo/db:multitenancy",
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
#include "mongo/bson/bsonobj.h"
|
||||
#include "mongo/db/exec/sbe/values/value.h"
|
||||
#include "mongo/db/query/compiler/stats/scalar_histogram.h"
|
||||
#include "mongo/db/query/compiler/stats/stats_gen.h"
|
||||
#include "mongo/db/query/compiler/stats/stats_for_histograms_gen.h"
|
||||
#include "mongo/util/modules.h"
|
||||
|
||||
#include <map>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include "mongo/bson/bsonobj.h"
|
||||
#include "mongo/db/exec/sbe/values/value.h"
|
||||
#include "mongo/db/query/compiler/stats/stats_gen.h"
|
||||
#include "mongo/db/query/compiler/stats/stats_for_histograms_gen.h"
|
||||
#include "mongo/util/modules.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
#include "mongo/db/dbdirectclient.h"
|
||||
#include "mongo/db/namespace_string.h"
|
||||
#include "mongo/db/query/compiler/stats/ce_histogram.h"
|
||||
#include "mongo/db/query/compiler/stats/stats_gen.h"
|
||||
#include "mongo/db/query/compiler/stats/stats_for_histograms_gen.h"
|
||||
#include "mongo/db/query/find_command.h"
|
||||
#include "mongo/idl/idl_parser.h"
|
||||
#include "mongo/logv2/log.h"
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
#include "mongo/db/exec/sbe/values/value.h"
|
||||
#include "mongo/db/query/compiler/stats/ce_histogram.h"
|
||||
#include "mongo/db/query/compiler/stats/scalar_histogram.h"
|
||||
#include "mongo/db/query/compiler/stats/stats_gen.h"
|
||||
#include "mongo/db/query/compiler/stats/stats_for_histograms_gen.h"
|
||||
#include "mongo/idl/idl_parser.h"
|
||||
#include "mongo/unittest/unittest.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ mongo_cc_library(
|
|||
"plan_cache_invalidator.cpp",
|
||||
"plan_cache_log_utils.cpp",
|
||||
"sbe_plan_cache.cpp",
|
||||
"//src/mongo/db/query/stage_builder/sbe:builder_data.h",
|
||||
],
|
||||
hdrs = [
|
||||
"classic_plan_cache.h",
|
||||
|
|
@ -25,6 +24,7 @@ mongo_cc_library(
|
|||
"plan_cache_log_utils.h",
|
||||
"sbe_plan_cache.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/db/query/stage_builder/sbe:builder_data.h"],
|
||||
deps = [
|
||||
"//src/mongo:base",
|
||||
"//src/mongo/db:query_expressions",
|
||||
|
|
@ -52,12 +52,12 @@ mongo_cc_benchmark(
|
|||
name = "plan_cache_key_encoding_bm",
|
||||
srcs = [
|
||||
"plan_cache_bm_fixture.cpp",
|
||||
"plan_cache_bm_fixture.h",
|
||||
"plan_cache_key_encoding_agg_bm.cpp",
|
||||
"plan_cache_key_encoding_find_bm.cpp",
|
||||
"plan_cache_parse_encode_bm.cpp",
|
||||
"plan_cache_parse_encode_pipeline_bm.cpp",
|
||||
],
|
||||
private_hdrs = [":plan_cache_bm_fixture.h"],
|
||||
tags = ["query_bm"],
|
||||
deps = [
|
||||
"//src/mongo/db:query_exec",
|
||||
|
|
@ -74,8 +74,8 @@ mongo_cc_benchmark(
|
|||
|
||||
mongo_cc_benchmark(
|
||||
name = "plan_cache_classic_bm",
|
||||
srcs = [
|
||||
"plan_cache_classic_bm.cpp",
|
||||
srcs = ["plan_cache_classic_bm.cpp"],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/local_catalog:index_catalog_entry_mock.h",
|
||||
"//src/mongo/db/local_catalog:index_catalog_mock.h",
|
||||
"//src/mongo/db/query:query_planner_test_fixture.h",
|
||||
|
|
|
|||
|
|
@ -74,18 +74,20 @@ mongo_cc_library(
|
|||
name = "query_settings_service",
|
||||
srcs = [
|
||||
"query_settings_backfill.cpp",
|
||||
"query_settings_backfill.h",
|
||||
"query_settings_cluster_parameter_impl.cpp",
|
||||
"query_settings_manager.cpp",
|
||||
"query_settings_manager.h",
|
||||
"query_settings_service.cpp",
|
||||
"query_settings_usage_tracker.cpp",
|
||||
"query_settings_usage_tracker.h",
|
||||
":query_settings_cluster_parameter_gen",
|
||||
],
|
||||
hdrs = [
|
||||
"query_settings_service.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
":query_settings_backfill.h",
|
||||
":query_settings_manager.h",
|
||||
":query_settings_usage_tracker.h",
|
||||
],
|
||||
deps = [
|
||||
":query_settings",
|
||||
"//src/mongo/client:remote_command_targeter",
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@ mongo_cc_library(
|
|||
srcs = [
|
||||
"query_shape.cpp",
|
||||
"shape_helpers.cpp",
|
||||
"//src/mongo/db/query:count_request.h",
|
||||
"//src/mongo/db/query/compiler/logical_model/projection:projection_ast_util.h",
|
||||
],
|
||||
hdrs = [
|
||||
"agg_cmd_shape.h",
|
||||
|
|
@ -52,6 +50,10 @@ mongo_cc_library(
|
|||
header_deps = [
|
||||
":query_shape_hash",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/query/compiler/logical_model/projection:projection_ast_util.h",
|
||||
"//src/mongo/db/query:count_request.h",
|
||||
],
|
||||
deps = [
|
||||
":query_shape_common",
|
||||
"//src/mongo:base",
|
||||
|
|
@ -63,15 +65,15 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "update_cmd_shape",
|
||||
srcs = [
|
||||
"update_cmd_shape.cpp",
|
||||
"//src/mongo/db/query:count_request.h",
|
||||
"//src/mongo/db/query/compiler/logical_model/projection:projection_ast_util.h",
|
||||
],
|
||||
srcs = ["update_cmd_shape.cpp"],
|
||||
hdrs = [
|
||||
"let_shape_component.h",
|
||||
"update_cmd_shape.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/query/compiler/logical_model/projection:projection_ast_util.h",
|
||||
"//src/mongo/db/query:count_request.h",
|
||||
],
|
||||
deps = [
|
||||
":query_shape_common",
|
||||
"//src/mongo:base",
|
||||
|
|
|
|||
|
|
@ -2,6 +2,12 @@ load("//bazel:mongo_src_rules.bzl", "mongo_cc_binary", "mongo_cc_library")
|
|||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(
|
||||
glob([
|
||||
"*.h",
|
||||
]),
|
||||
)
|
||||
|
||||
mongo_cc_library(
|
||||
name = "mongotest_core",
|
||||
srcs = [
|
||||
|
|
@ -30,10 +36,8 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_binary(
|
||||
name = "mongotest",
|
||||
srcs = [
|
||||
"main.cpp",
|
||||
"mock_version_info.h",
|
||||
],
|
||||
srcs = ["main.cpp"],
|
||||
private_hdrs = [":mock_version_info.h"],
|
||||
tags = [
|
||||
"devcore",
|
||||
"dist_test",
|
||||
|
|
|
|||
|
|
@ -80,18 +80,20 @@ mongo_cc_library(
|
|||
":internal_search_cluster_parameters_gen",
|
||||
":internal_search_mongot_remote_spec_gen",
|
||||
":search_query_view_spec_gen",
|
||||
"//src/mongo/db/exec/agg:exec_pipeline.h",
|
||||
"//src/mongo/db/exec/agg:pipeline_builder.h",
|
||||
"//src/mongo/db/pipeline:catalog_resource_handle.h",
|
||||
"//src/mongo/db/pipeline:document_source_set_variable_from_subpipeline.h",
|
||||
"//src/mongo/db/pipeline:shard_role_transaction_resources_stasher_for_pipeline.h",
|
||||
"//src/mongo/db/pipeline/search:document_source_internal_search_id_lookup.h",
|
||||
"//src/mongo/db/pipeline/search:document_source_internal_search_mongot_remote.h",
|
||||
],
|
||||
hdrs = [
|
||||
"mongot_cursor.h",
|
||||
"mongot_cursor_getmore_strategy.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/exec/agg:exec_pipeline.h",
|
||||
"//src/mongo/db/exec/agg:pipeline_builder.h",
|
||||
"//src/mongo/db/pipeline/search:document_source_internal_search_id_lookup.h",
|
||||
"//src/mongo/db/pipeline/search:document_source_internal_search_mongot_remote.h",
|
||||
"//src/mongo/db/pipeline:catalog_resource_handle.h",
|
||||
"//src/mongo/db/pipeline:document_source_set_variable_from_subpipeline.h",
|
||||
"//src/mongo/db/pipeline:shard_role_transaction_resources_stasher_for_pipeline.h",
|
||||
],
|
||||
deps = [
|
||||
":mongot_options", # TODO(SERVER-93876): Remove.
|
||||
":search_task_executors",
|
||||
|
|
@ -244,6 +246,8 @@ mongo_cc_unit_test(
|
|||
srcs = [
|
||||
"mongot_cursor_helpers_test.cpp",
|
||||
"mongot_cursor_test.cpp",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/executor:pinned_connection_task_executor_test_fixture.h",
|
||||
"//src/mongo/executor:task_executor_cursor_test_fixture.h",
|
||||
"//src/mongo/transport:test_fixtures.h",
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ mongo_cc_unit_test(
|
|||
"type_checker_test.cpp",
|
||||
"value_lifetime_test.cpp",
|
||||
"vectorizer_test.cpp",
|
||||
"//src/mongo/db/exec:shard_filterer_mock.h",
|
||||
"//src/mongo/db/query/stage_builder:classic_stage_builder_test.cpp",
|
||||
],
|
||||
data = [
|
||||
|
|
@ -58,6 +57,7 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/db/test_output/query/stage_builder/sbe/sbe_timeseries_test:test_data",
|
||||
"//src/mongo/db/test_output/query/stage_builder/sbe/search_sbe_stage_builder_test:test_data",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/db/exec:shard_filterer_mock.h"],
|
||||
tags = [
|
||||
"mongo_unittest_fourth_group",
|
||||
],
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ exports_files(
|
|||
|
||||
idl_generator(
|
||||
name = "stage_memory_limit_knobs_gen",
|
||||
src = "knobs.idl",
|
||||
src = "stage_memory_limit_knobs.idl",
|
||||
hdrs = [
|
||||
"knobs_protector.h",
|
||||
],
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include "mongo/db/query/stage_memory_limit_knobs/knobs.h"
|
||||
|
||||
#include "mongo/db/query/stage_memory_limit_knobs/knobs_gen.h"
|
||||
#include "mongo/db/query/stage_memory_limit_knobs/stage_memory_limit_knobs_gen.h"
|
||||
|
||||
namespace mongo {
|
||||
|
||||
|
|
|
|||
|
|
@ -31,5 +31,5 @@
|
|||
|
||||
#ifndef QUERY_STAGE_MEMORY_LIMITS_KNOBS_PRIVATE_OVERRIDE
|
||||
#error \
|
||||
"mongo/db/query/stage_memory_limit_knobs/knobs_gen.h must not be used directly. Use the interface provided by mongo/db/query/stage_memory_limit_knobs/knobs.h"
|
||||
"mongo/db/query/stage_memory_limit_knobs/stage_memory_limit_knobs_gen.h must not be used directly. Use the interface provided by mongo/db/query/stage_memory_limit_knobs/knobs.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ mongo_cc_library(
|
|||
mongo_cc_unit_test(
|
||||
name = "query_util_test",
|
||||
srcs = [
|
||||
"cartesian_product.h",
|
||||
"cartesian_product_test.cpp",
|
||||
"deferred_test.cpp",
|
||||
"hash_roaring_set_test.cpp",
|
||||
|
|
@ -100,6 +99,7 @@ mongo_cc_unit_test(
|
|||
"string_util_test.cpp",
|
||||
"validate_id_test.cpp",
|
||||
],
|
||||
private_hdrs = [":cartesian_product.h"],
|
||||
tags = [
|
||||
"mongo_unittest_third_group",
|
||||
],
|
||||
|
|
|
|||
|
|
@ -137,8 +137,6 @@ mongo_cc_library(
|
|||
srcs = [
|
||||
"write_ops.cpp",
|
||||
":write_ops_gen",
|
||||
"//src/mongo/db/update:update_oplog_entry_serialization.h",
|
||||
"//src/mongo/db/update:update_oplog_entry_version.h",
|
||||
],
|
||||
hdrs = [
|
||||
"write_ops.h",
|
||||
|
|
@ -146,6 +144,10 @@ mongo_cc_library(
|
|||
header_deps = [
|
||||
"//src/mongo/db/global_catalog:sharding_catalog_client",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/update:update_oplog_entry_serialization.h",
|
||||
"//src/mongo/db/update:update_oplog_entry_version.h",
|
||||
],
|
||||
deps = [
|
||||
"//src/mongo:base",
|
||||
"//src/mongo/crypto:encrypted_field_config",
|
||||
|
|
|
|||
|
|
@ -340,11 +340,8 @@ mongo_cc_library(
|
|||
mongo_cc_library(
|
||||
name = "oplog_write_interface",
|
||||
srcs = [
|
||||
"oplog_applier_batcher.h",
|
||||
"oplog_batch.h",
|
||||
"oplog_writer.cpp",
|
||||
"oplog_writer_batcher.cpp",
|
||||
"//src/mongo/util/concurrency:thread_pool.h",
|
||||
],
|
||||
hdrs = [
|
||||
"oplog_buffer.h",
|
||||
|
|
@ -353,6 +350,11 @@ mongo_cc_library(
|
|||
"//src/mongo/db/commands:feature_compatibility_version.h",
|
||||
"//src/mongo/db/commands:set_feature_compatibility_version_gen",
|
||||
],
|
||||
private_hdrs = [
|
||||
":oplog_applier_batcher.h",
|
||||
":oplog_batch.h",
|
||||
"//src/mongo/util/concurrency:thread_pool.h",
|
||||
],
|
||||
deps = [
|
||||
":oplog_entry",
|
||||
":repl_coordinator_interface",
|
||||
|
|
@ -505,11 +507,11 @@ mongo_cc_library(
|
|||
srcs = [
|
||||
"apply_ops_command_info.cpp",
|
||||
"apply_ops_gen",
|
||||
"multiapplier.h",
|
||||
],
|
||||
hdrs = [
|
||||
"apply_ops_command_info.h",
|
||||
],
|
||||
private_hdrs = [":multiapplier.h"],
|
||||
deps = [
|
||||
":oplog_entry",
|
||||
"//src/mongo:base",
|
||||
|
|
@ -693,14 +695,14 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "roll_back_local_operations",
|
||||
srcs = [
|
||||
"roll_back_local_operations.cpp",
|
||||
"//src/mongo/db/repl:oplog_interface.h",
|
||||
"//src/mongo/db/transaction:transaction_history_iterator.h",
|
||||
],
|
||||
srcs = ["roll_back_local_operations.cpp"],
|
||||
hdrs = [
|
||||
"roll_back_local_operations.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
":oplog_interface.h",
|
||||
"//src/mongo/db/transaction:transaction_history_iterator.h",
|
||||
],
|
||||
deps = [
|
||||
":oplog_entry",
|
||||
":optime", # TODO(SERVER-93876): Remove.
|
||||
|
|
@ -738,13 +740,13 @@ mongo_cc_library(
|
|||
srcs = [
|
||||
"replication_consistency_markers.cpp",
|
||||
"replication_process.cpp",
|
||||
"replication_recovery.h",
|
||||
],
|
||||
hdrs = [
|
||||
"collection_bulk_loader.h",
|
||||
"replication_consistency_markers.h",
|
||||
"replication_process.h",
|
||||
],
|
||||
private_hdrs = [":replication_recovery.h"],
|
||||
deps = [
|
||||
":optime", # TODO(SERVER-93876): Remove.
|
||||
":rollback_idl", # TODO(SERVER-93876): Remove.
|
||||
|
|
@ -1026,13 +1028,11 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "oplog_buffer_collection",
|
||||
srcs = [
|
||||
"oplog_buffer_collection.cpp",
|
||||
"//src/mongo/util:queue.h",
|
||||
],
|
||||
srcs = ["oplog_buffer_collection.cpp"],
|
||||
hdrs = [
|
||||
"oplog_buffer_collection.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/util:queue.h"],
|
||||
deps = [
|
||||
":storage_interface",
|
||||
"//src/mongo/db:dbdirectclient",
|
||||
|
|
@ -1146,12 +1146,10 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "slotted_timestamp_list",
|
||||
srcs = [
|
||||
"slotted_timestamp_list.h",
|
||||
],
|
||||
hdrs = [
|
||||
"slotted_timestamp_list.h",
|
||||
],
|
||||
private_hdrs = [":slotted_timestamp_list.h"],
|
||||
deps = [
|
||||
"//src/mongo:base",
|
||||
],
|
||||
|
|
@ -1175,14 +1173,14 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "replication_auth",
|
||||
srcs = [
|
||||
"replication_auth.cpp",
|
||||
"//src/mongo/client:dbclient_connection.h",
|
||||
"//src/mongo/client:dbclient_session.h",
|
||||
],
|
||||
srcs = ["replication_auth.cpp"],
|
||||
hdrs = [
|
||||
"replication_auth.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/client:dbclient_connection.h",
|
||||
"//src/mongo/client:dbclient_session.h",
|
||||
],
|
||||
deps = [
|
||||
"//src/mongo/client:authentication",
|
||||
"//src/mongo/db/auth:authorization_manager_global",
|
||||
|
|
@ -1646,7 +1644,6 @@ mongo_cc_library(
|
|||
mongo_cc_library(
|
||||
name = "replmocks",
|
||||
srcs = [
|
||||
"multiapplier.h",
|
||||
"oplog_fetcher_mock.cpp",
|
||||
"replication_consistency_markers_mock.cpp",
|
||||
"replication_coordinator_external_state_mock.cpp",
|
||||
|
|
@ -1662,6 +1659,7 @@ mongo_cc_library(
|
|||
"storage_interface_mock.h",
|
||||
"//src/mongo/db/storage:snapshot_manager.h",
|
||||
],
|
||||
private_hdrs = [":multiapplier.h"],
|
||||
deps = [
|
||||
":data_replicator_external_state_impl",
|
||||
":isself",
|
||||
|
|
@ -1681,10 +1679,10 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "oplog_interface_mock",
|
||||
srcs = [
|
||||
"oplog_interface_mock.cpp",
|
||||
"oplog_interface_mock.h",
|
||||
"//src/mongo/db/repl:oplog_interface.h",
|
||||
srcs = ["oplog_interface_mock.cpp"],
|
||||
private_hdrs = [
|
||||
":oplog_interface.h",
|
||||
":oplog_interface_mock.h",
|
||||
"//src/mongo/db/transaction:transaction_history_iterator.h",
|
||||
],
|
||||
deps = [
|
||||
|
|
@ -1809,14 +1807,14 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "data_replicator_external_state_mock",
|
||||
srcs = [
|
||||
"data_replicator_external_state.h",
|
||||
"data_replicator_external_state_mock.cpp",
|
||||
"multiapplier.h",
|
||||
],
|
||||
srcs = ["data_replicator_external_state_mock.cpp"],
|
||||
hdrs = [
|
||||
"data_replicator_external_state_mock.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
":data_replicator_external_state.h",
|
||||
":multiapplier.h",
|
||||
],
|
||||
deps = [
|
||||
":oplog_application_interface",
|
||||
":oplog_buffer_blocking_queue",
|
||||
|
|
@ -1986,10 +1984,8 @@ mongo_cc_unit_test(
|
|||
|
||||
mongo_cc_unit_test(
|
||||
name = "oplog_visibility_manager_test",
|
||||
srcs = [
|
||||
"oplog_visibility_manager.h",
|
||||
"oplog_visibility_manager_test.cpp",
|
||||
],
|
||||
srcs = ["oplog_visibility_manager_test.cpp"],
|
||||
private_hdrs = [":oplog_visibility_manager.h"],
|
||||
tags = ["mongo_unittest_fourth_group"],
|
||||
deps = [
|
||||
":repl_coordinator_interface",
|
||||
|
|
@ -2071,10 +2067,10 @@ mongo_cc_unit_test(
|
|||
"sync_source_resolver_test.cpp",
|
||||
"task_runner_test.cpp",
|
||||
"task_runner_test_fixture.cpp",
|
||||
"task_runner_test_fixture.h",
|
||||
"vote_requester_test.cpp",
|
||||
"wait_for_majority_service_test.cpp",
|
||||
],
|
||||
private_hdrs = [":task_runner_test_fixture.h"],
|
||||
tags = ["mongo_unittest_first_group"],
|
||||
target_compatible_with = select({
|
||||
"//bazel/config:use_wiredtiger_enabled": [],
|
||||
|
|
@ -2162,8 +2158,8 @@ mongo_cc_unit_test(
|
|||
"replication_coordinator_impl_reconfig_test.cpp",
|
||||
"replication_coordinator_impl_test.cpp",
|
||||
"topology_coordinator_v1_test.cpp",
|
||||
"//src/mongo/unittest:ensure_fcv.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/unittest:ensure_fcv.h"],
|
||||
tags = [
|
||||
"mongo_unittest_fifth_group",
|
||||
],
|
||||
|
|
@ -2236,7 +2232,9 @@ mongo_cc_unit_test(
|
|||
"rollback_checker_test.cpp",
|
||||
"rollback_impl_test.cpp",
|
||||
"rollback_test_fixture.cpp",
|
||||
"rollback_test_fixture.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
":rollback_test_fixture.h",
|
||||
"//src/mongo/db/local_catalog:collection_mock.h",
|
||||
],
|
||||
tags = ["mongo_unittest_fourth_group"],
|
||||
|
|
@ -2275,10 +2273,8 @@ mongo_cc_unit_test(
|
|||
|
||||
mongo_cc_unit_test(
|
||||
name = "storage_timestamp_test",
|
||||
srcs = [
|
||||
"storage_timestamp_test.cpp",
|
||||
"//src/mongo/dbtests:dbtests.h",
|
||||
],
|
||||
srcs = ["storage_timestamp_test.cpp"],
|
||||
private_hdrs = ["//src/mongo/dbtests:dbtests.h"],
|
||||
tags = ["mongo_unittest_fourth_group"],
|
||||
deps = [
|
||||
":oplog_application",
|
||||
|
|
@ -2307,11 +2303,13 @@ mongo_cc_unit_test(
|
|||
"check_quorum_for_config_change_test.cpp",
|
||||
"repl_set_config_checks_test.cpp",
|
||||
"repl_set_config_test.cpp",
|
||||
"repl_set_config_test.h",
|
||||
"repl_set_heartbeat_args_v1_test.cpp",
|
||||
"repl_set_heartbeat_response_test.cpp",
|
||||
"repl_set_request_votes_args_test.cpp",
|
||||
"repl_set_tag_test.cpp",
|
||||
],
|
||||
private_hdrs = [
|
||||
":repl_set_config_test.h",
|
||||
"//src/mongo/unittest:ensure_fcv.h",
|
||||
],
|
||||
tags = ["mongo_unittest_third_group"],
|
||||
|
|
@ -2358,10 +2356,8 @@ mongo_cc_unit_test(
|
|||
|
||||
mongo_cc_unit_test(
|
||||
name = "db_repl_set_aware_service_test",
|
||||
srcs = [
|
||||
"replica_set_aware_service_test.cpp",
|
||||
"//src/mongo/db/local_catalog:database_holder_mock.h",
|
||||
],
|
||||
srcs = ["replica_set_aware_service_test.cpp"],
|
||||
private_hdrs = ["//src/mongo/db/local_catalog:database_holder_mock.h"],
|
||||
tags = ["mongo_unittest_eighth_group"],
|
||||
deps = [
|
||||
":repl_coordinator_impl",
|
||||
|
|
@ -2435,10 +2431,8 @@ mongo_cc_benchmark(
|
|||
|
||||
mongo_cc_benchmark(
|
||||
name = "slotted_timestamp_list_bm",
|
||||
srcs = [
|
||||
"slotted_timestamp_list.h",
|
||||
"slotted_timestamp_list_bm.cpp",
|
||||
],
|
||||
srcs = ["slotted_timestamp_list_bm.cpp"],
|
||||
private_hdrs = [":slotted_timestamp_list.h"],
|
||||
tags = ["repl_bm"],
|
||||
deps = [
|
||||
],
|
||||
|
|
|
|||
|
|
@ -37,13 +37,11 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "hello_response",
|
||||
srcs = [
|
||||
"hello_response.cpp",
|
||||
"//src/mongo/db/repl:optime_with.h",
|
||||
],
|
||||
srcs = ["hello_response.cpp"],
|
||||
hdrs = [
|
||||
"hello_response.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/db/repl:optime_with.h"],
|
||||
deps = [
|
||||
"//src/mongo/db/repl:optime",
|
||||
"//src/mongo/rpc:metadata",
|
||||
|
|
|
|||
|
|
@ -152,10 +152,8 @@ mongo_cc_library(
|
|||
mongo_cc_unit_test(
|
||||
name = "initial_syncer_test",
|
||||
size = "small",
|
||||
srcs = [
|
||||
"initial_syncer_test.cpp",
|
||||
"//src/mongo/db/storage:storage_engine_mock.h",
|
||||
],
|
||||
srcs = ["initial_syncer_test.cpp"],
|
||||
private_hdrs = ["//src/mongo/db/storage:storage_engine_mock.h"],
|
||||
tags = ["mongo_unittest_third_group"],
|
||||
deps = [
|
||||
":initial_syncer",
|
||||
|
|
|
|||
|
|
@ -728,7 +728,6 @@ mongo_cc_library(
|
|||
"//src/mongo/db/s/resharding:resharding_add_resume_id_stage.cpp",
|
||||
"//src/mongo/db/s/resharding:resharding_change_streams_monitor.cpp",
|
||||
"//src/mongo/db/s/resharding:resharding_clone_fetcher.cpp",
|
||||
"//src/mongo/db/s/resharding:resharding_clone_fetcher.h",
|
||||
"//src/mongo/db/s/resharding:resharding_collection_cloner.cpp",
|
||||
"//src/mongo/db/s/resharding:resharding_coordinator_commit_monitor.cpp",
|
||||
"//src/mongo/db/s/resharding:resharding_coordinator_dao.cpp",
|
||||
|
|
@ -881,6 +880,7 @@ mongo_cc_library(
|
|||
"//src/mongo/db/sharding_environment:sharding_ready.h",
|
||||
"//src/mongo/db/topology:shard_identity_rollback_notifier.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/db/s/resharding:resharding_clone_fetcher.h"],
|
||||
deps = [
|
||||
":analyze_shard_key_util",
|
||||
":balancer_stats_registry",
|
||||
|
|
@ -1376,11 +1376,13 @@ mongo_cc_library(
|
|||
name = "sharding_test_helpers",
|
||||
srcs = [
|
||||
"//src/mongo/db/global_catalog/ddl:sharding_ddl_coordinator_external_state_for_test.cpp",
|
||||
"//src/mongo/db/s/resharding:resharding_test_util.cpp",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/global_catalog/ddl:sharding_ddl_coordinator_external_state_for_test.h",
|
||||
"//src/mongo/db/global_catalog/ddl:sharding_test_helpers.h",
|
||||
"//src/mongo/db/s/resharding:resharding_metrics_test_fixture.h",
|
||||
"//src/mongo/db/s/resharding:resharding_service_test_helpers.h",
|
||||
"//src/mongo/db/s/resharding:resharding_test_util.cpp",
|
||||
"//src/mongo/db/s/resharding:resharding_test_util.h",
|
||||
],
|
||||
deps = [":db_s_shard_server_test_deps"],
|
||||
|
|
@ -1399,7 +1401,6 @@ mongo_cc_unit_test(
|
|||
"migration_util_test.cpp",
|
||||
"range_deleter_service_op_observer_test.cpp",
|
||||
"range_deleter_service_test.cpp",
|
||||
"range_deleter_service_test.h",
|
||||
"range_deleter_service_test_util.cpp",
|
||||
"range_deletion_task_tracker_test.cpp",
|
||||
"range_deletion_util_test.cpp",
|
||||
|
|
@ -1423,6 +1424,7 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/db/sharding_environment:range_arithmetic_test.cpp",
|
||||
"//src/mongo/db/sharding_environment:shard_local_test.cpp",
|
||||
],
|
||||
private_hdrs = [":range_deleter_service_test.h"],
|
||||
tags = [
|
||||
"mongo_unittest_fourth_group",
|
||||
],
|
||||
|
|
@ -1461,7 +1463,6 @@ mongo_cc_unit_test(
|
|||
"transaction_coordinator_structures_test.cpp",
|
||||
"transaction_coordinator_test.cpp",
|
||||
"transaction_coordinator_test_fixture.cpp",
|
||||
"transaction_coordinator_test_fixture.h",
|
||||
"//src/mongo/db/global_catalog:type_shard_collection_test.cpp",
|
||||
"//src/mongo/db/global_catalog:type_shard_identity_test.cpp",
|
||||
"//src/mongo/db/global_catalog/ddl:migration_blocking_operation_coordinator_test.cpp",
|
||||
|
|
@ -1472,6 +1473,7 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/db/s/primary_only_service_helpers:with_automatic_retry_test.cpp",
|
||||
"//src/mongo/db/vector_clock:vector_clock_shard_server_test.cpp",
|
||||
],
|
||||
private_hdrs = [":transaction_coordinator_test_fixture.h"],
|
||||
tags = [
|
||||
"mongo_unittest_sixth_group",
|
||||
],
|
||||
|
|
@ -1580,9 +1582,7 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/db/s/balancer:balancer_commands_scheduler_test.cpp",
|
||||
"//src/mongo/db/s/balancer:balancer_defragmentation_policy_test.cpp",
|
||||
"//src/mongo/db/s/balancer:balancer_policy_test.cpp",
|
||||
"//src/mongo/db/s/balancer:cluster_statistics_mock.h",
|
||||
"//src/mongo/db/s/balancer:migration_test_fixture.cpp",
|
||||
"//src/mongo/db/s/balancer:migration_test_fixture.h",
|
||||
"//src/mongo/db/s/balancer:move_unsharded_policy_test.cpp",
|
||||
"//src/mongo/db/s/config:initial_split_policy_test.cpp",
|
||||
"//src/mongo/db/s/config:sampling_based_initial_split_policy_test.cpp",
|
||||
|
|
@ -1593,13 +1593,17 @@ mongo_cc_unit_test(
|
|||
"//src/mongo/db/s/resharding:resharding_coordinator_service_test.cpp",
|
||||
"//src/mongo/db/s/resharding:resharding_coordinator_service_util_test.cpp",
|
||||
"//src/mongo/db/s/resharding:resharding_coordinator_test.cpp",
|
||||
"//src/mongo/db/s/resharding:resharding_service_test_helpers.h",
|
||||
"//src/mongo/db/s/resharding:resharding_util_test.cpp",
|
||||
"//src/mongo/db/sharding_environment:config_server_op_observer_test.cpp",
|
||||
"//src/mongo/db/topology:sharding_catalog_manager_add_shard_test.cpp",
|
||||
"//src/mongo/db/topology:sharding_catalog_manager_remove_shard_test.cpp",
|
||||
"//src/mongo/db/vector_clock:topology_time_ticker_test.cpp",
|
||||
"//src/mongo/db/vector_clock:vector_clock_config_server_test.cpp",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/s/balancer:cluster_statistics_mock.h",
|
||||
"//src/mongo/db/s/balancer:migration_test_fixture.h",
|
||||
"//src/mongo/db/s/resharding:resharding_service_test_helpers.h",
|
||||
"//src/mongo/s/query/exec:sharded_agg_test_fixture.h",
|
||||
],
|
||||
tags = [
|
||||
|
|
|
|||
|
|
@ -58,12 +58,10 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "sorter_test_utils",
|
||||
srcs = [
|
||||
"sorter_test_utils.h",
|
||||
],
|
||||
hdrs = [
|
||||
"sorter_test_utils.h",
|
||||
],
|
||||
private_hdrs = [":sorter_test_utils.h"],
|
||||
deps = [
|
||||
":sorter_base",
|
||||
"//src/mongo/db/storage:encryption_hooks",
|
||||
|
|
|
|||
|
|
@ -266,14 +266,14 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "mdb_catalog",
|
||||
srcs = [
|
||||
"mdb_catalog.cpp",
|
||||
"//src/mongo/db/rss:persistence_provider.h",
|
||||
"//src/mongo/db/storage/kv:kv_engine.h",
|
||||
],
|
||||
srcs = ["mdb_catalog.cpp"],
|
||||
hdrs = [
|
||||
"mdb_catalog.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/rss:persistence_provider.h",
|
||||
"//src/mongo/db/storage/kv:kv_engine.h",
|
||||
],
|
||||
deps = [
|
||||
":record_store_base",
|
||||
"//src/mongo/db:server_base",
|
||||
|
|
@ -297,10 +297,8 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "disk_space_util",
|
||||
srcs = [
|
||||
"disk_space_util.cpp",
|
||||
"disk_space_util.h",
|
||||
],
|
||||
srcs = ["disk_space_util.cpp"],
|
||||
private_hdrs = [":disk_space_util.h"],
|
||||
deps = [
|
||||
":storage_options", # TODO(SERVER-93876): Remove.
|
||||
"//src/mongo:base",
|
||||
|
|
@ -751,12 +749,12 @@ mongo_cc_unit_test(
|
|||
"spill_table_test.cpp",
|
||||
"storage_engine_lock_file_test.cpp",
|
||||
"storage_engine_metadata_test.cpp",
|
||||
"storage_engine_test_fixture.h",
|
||||
"storage_repair_observer_test.cpp",
|
||||
"//src/mongo/db/storage/kv:durable_catalog_test.cpp",
|
||||
"//src/mongo/db/storage/kv:kv_drop_pending_ident_reaper_test.cpp",
|
||||
"//src/mongo/db/storage/kv:storage_engine_test.cpp",
|
||||
],
|
||||
private_hdrs = [":storage_engine_test_fixture.h"],
|
||||
tags = [
|
||||
"mongo_unittest_first_group",
|
||||
"server-storage-engine-integration",
|
||||
|
|
|
|||
|
|
@ -25,13 +25,11 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "key_string_test_util",
|
||||
srcs = [
|
||||
"key_string_test_util.cpp",
|
||||
"//src/mongo/bson:bsonobj_comparator.h",
|
||||
],
|
||||
srcs = ["key_string_test_util.cpp"],
|
||||
hdrs = [
|
||||
"key_string_test_util.h",
|
||||
],
|
||||
private_hdrs = ["//src/mongo/bson:bsonobj_comparator.h"],
|
||||
deps = [
|
||||
"key_string",
|
||||
"//src/mongo/unittest",
|
||||
|
|
|
|||
|
|
@ -210,6 +210,8 @@ mongo_cc_unit_test(
|
|||
"wiredtiger_stats_test.cpp",
|
||||
"wiredtiger_storage_options_config_string_flags_parser_test.cpp",
|
||||
"wiredtiger_util_test.cpp",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/util:executor_test_util.h",
|
||||
"//src/mongo/util:future_test_utils.h",
|
||||
],
|
||||
|
|
|
|||
|
|
@ -42,14 +42,14 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "timeseries_extended_range",
|
||||
srcs = [
|
||||
"timeseries_constants.h",
|
||||
"timeseries_extended_range.cpp",
|
||||
"//src/mongo/db/local_catalog/ddl:create_command_validation.h",
|
||||
],
|
||||
srcs = ["timeseries_extended_range.cpp"],
|
||||
hdrs = [
|
||||
"timeseries_extended_range.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
":timeseries_constants.h",
|
||||
"//src/mongo/db/local_catalog/ddl:create_command_validation.h",
|
||||
],
|
||||
deps = [
|
||||
":timeseries_options", # TODO(SERVER-93876): Remove.
|
||||
"//src/mongo:base",
|
||||
|
|
@ -154,12 +154,6 @@ mongo_cc_library(
|
|||
"timeseries_dotted_path_support.cpp",
|
||||
"timeseries_index_schema_conversion_functions.cpp",
|
||||
"timeseries_update_delete_util.cpp",
|
||||
"//src/mongo/db/matcher:extensions_callback_real.h",
|
||||
"//src/mongo/db/pipeline:document_source_coll_stats.h",
|
||||
"//src/mongo/db/pipeline:document_source_index_stats.h",
|
||||
"//src/mongo/db/pipeline:document_source_internal_convert_bucket_index_stats.h",
|
||||
"//src/mongo/db/pipeline:document_source_internal_unpack_bucket.h",
|
||||
"//src/mongo/db/query/write_ops:parsed_writes_common.h",
|
||||
],
|
||||
hdrs = [
|
||||
"timeseries_commands_conversion_helper.h",
|
||||
|
|
@ -168,6 +162,14 @@ mongo_cc_library(
|
|||
"timeseries_request_util.h",
|
||||
"timeseries_update_delete_util.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/matcher:extensions_callback_real.h",
|
||||
"//src/mongo/db/pipeline:document_source_coll_stats.h",
|
||||
"//src/mongo/db/pipeline:document_source_index_stats.h",
|
||||
"//src/mongo/db/pipeline:document_source_internal_convert_bucket_index_stats.h",
|
||||
"//src/mongo/db/pipeline:document_source_internal_unpack_bucket.h",
|
||||
"//src/mongo/db/query/write_ops:parsed_writes_common.h",
|
||||
],
|
||||
deps = [
|
||||
":bucket_compression",
|
||||
":timeseries_options", # TODO(SERVER-93876): Remove.
|
||||
|
|
@ -202,14 +204,14 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "timeseries_write_util",
|
||||
srcs = [
|
||||
"timeseries_write_util.cpp",
|
||||
"//src/mongo/db/query:explain.h",
|
||||
"//src/mongo/db/query/write_ops:update_request.h",
|
||||
],
|
||||
srcs = ["timeseries_write_util.cpp"],
|
||||
hdrs = [
|
||||
"timeseries_write_util.h",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/db/query/write_ops:update_request.h",
|
||||
"//src/mongo/db/query:explain.h",
|
||||
],
|
||||
deps = [
|
||||
":bucket_compression",
|
||||
":bucket_compression_failure",
|
||||
|
|
|
|||
|
|
@ -48,10 +48,7 @@ mongo_cc_library(
|
|||
|
||||
mongo_cc_library(
|
||||
name = "timeseries_write_ops_utils_internal",
|
||||
srcs = [
|
||||
"timeseries_write_ops_utils_internal.cpp",
|
||||
"timeseries_write_ops_utils_internal.h",
|
||||
],
|
||||
srcs = ["timeseries_write_ops_utils_internal.cpp"],
|
||||
hdrs = [
|
||||
"measurement.h",
|
||||
"//src/mongo/db/timeseries/bucket_catalog:bucket_catalog_helpers.h",
|
||||
|
|
@ -59,6 +56,7 @@ mongo_cc_library(
|
|||
"//src/mongo/db/timeseries/bucket_catalog:write_batch.h",
|
||||
"//src/mongo/util/tracking",
|
||||
],
|
||||
private_hdrs = [":timeseries_write_ops_utils_internal.h"],
|
||||
deps = [
|
||||
"//src/mongo/db:commands",
|
||||
"//src/mongo/db:server_base",
|
||||
|
|
|
|||
|
|
@ -45,8 +45,6 @@ mongo_cc_library(
|
|||
"document_diff_applier.cpp",
|
||||
"document_diff_calculator.cpp",
|
||||
"document_diff_serialization.cpp",
|
||||
"//src/mongo/util:dynamic_bitset.h",
|
||||
"//src/mongo/util:inlined_storage.h",
|
||||
],
|
||||
hdrs = [
|
||||
"document_diff_applier.h",
|
||||
|
|
@ -54,6 +52,10 @@ mongo_cc_library(
|
|||
"document_diff_serialization.h",
|
||||
"//src/mongo/base:error_codes_header",
|
||||
],
|
||||
private_hdrs = [
|
||||
"//src/mongo/util:dynamic_bitset.h",
|
||||
"//src/mongo/util:inlined_storage.h",
|
||||
],
|
||||
deps = [
|
||||
"//src/mongo:base",
|
||||
"//src/mongo/db:common",
|
||||
|
|
@ -230,8 +232,8 @@ mongo_cc_unit_test(
|
|||
"update_oplog_entry_serialization_test.cpp",
|
||||
"update_serialization_test.cpp",
|
||||
"v2_log_builder_test.cpp",
|
||||
"//src/mongo/db/update:update_node_test_fixture.h",
|
||||
],
|
||||
private_hdrs = [":update_node_test_fixture.h"],
|
||||
tags = ["mongo_unittest_fifth_group"],
|
||||
deps = [
|
||||
":update",
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue