Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_runner: use LFC by default #8613

Open
wants to merge 106 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 76 commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
4b8c725
test_runner: use LFC by default
bayandin Aug 6, 2024
a82608a
test_lfc_resize: put LFC to repo dir
bayandin Aug 6, 2024
1d77f66
test_runner: delete lfc if we restart the endpoint
bayandin Aug 6, 2024
fada192
test_runner: use small max_file_cache_size & file_cache_size_limit
bayandin Aug 6, 2024
9b774fe
Revert "test_runner: use small max_file_cache_size & file_cache_size_…
bayandin Aug 6, 2024
f5f761d
test_runner: even smaller shared_buffers, max_file_cache_size, file_c…
bayandin Aug 6, 2024
90aca8b
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 14, 2024
c68bb65
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 14, 2024
0d9f3df
Fix the branch creation
a-masterov Oct 14, 2024
6954b5a
Migrate from os.path to Path approach
a-masterov Oct 14, 2024
9c27b97
Fix the lfc file path
a-masterov Oct 15, 2024
cc98bdd
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 15, 2024
2fed637
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 15, 2024
3115e7f
Change the size
a-masterov Oct 15, 2024
3cf3f2b
Create use_lfc tunable for Endpoint creation
a-masterov Oct 16, 2024
9230d1c
Do not throw an error if the directory exists
a-masterov Oct 16, 2024
3e82525
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 16, 2024
49821d0
use the shared buffers size 1MB for test_subscriber_synchronous_commit
a-masterov Oct 17, 2024
ec3838c
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 17, 2024
defd6dc
Increase the block limit
a-masterov Oct 17, 2024
46b96da
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 17, 2024
8ccc15e
change LFC parameters for the test `test_subscriber_synchronous_commit`
a-masterov Oct 18, 2024
4b71146
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 18, 2024
7e8946d
Merge remote-tracking branch 'origin/bayandin/regress-tests-use-LFC' …
a-masterov Oct 18, 2024
72a30f7
remove the redundant parameters
a-masterov Oct 18, 2024
ca6518f
remove the redundant shared buffers settings
a-masterov Oct 18, 2024
940ec43
Fix the case issue in config lines
a-masterov Oct 18, 2024
acceea1
Refactor logging
a-masterov Oct 18, 2024
c0382de
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 18, 2024
02dc6a8
Implement clear LFC
a-masterov Oct 18, 2024
f3b705b
Merge remote-tracking branch 'origin/bayandin/regress-tests-use-LFC' …
a-masterov Oct 18, 2024
191749d
Formatting
a-masterov Oct 18, 2024
c32a91c
Quote size
a-masterov Oct 18, 2024
4cf5571
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 18, 2024
a18a2e7
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 19, 2024
09ca19f
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 21, 2024
e005625
Change the LFC size by default
a-masterov Oct 21, 2024
8ecbbea
Change workflow to run v16 wo LFC
a-masterov Oct 21, 2024
9e20e7f
The same: next attempt
a-masterov Oct 21, 2024
5d282be
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 21, 2024
b7eafbb
The same: next attempt
a-masterov Oct 21, 2024
a11e68f
Revert "The same: next attempt"
a-masterov Oct 21, 2024
13eac9d
Revert "The same: next attempt"
a-masterov Oct 21, 2024
5d4d517
Revert "Change workflow to run v16 wo LFC"
a-masterov Oct 21, 2024
23a807f
Add run without LFC by default on postgres 16
a-masterov Oct 21, 2024
dad8d61
reformat
a-masterov Oct 21, 2024
b6aadc6
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 21, 2024
dd464bb
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 22, 2024
619f3e1
Set whe matrix more verbose
a-masterov Oct 22, 2024
1dbbf03
Set whe matrix more verbose
a-masterov Oct 22, 2024
c62f260
Don't run on debug
a-masterov Oct 22, 2024
3a50088
Change the way of excluding nolfc on debug
a-masterov Oct 23, 2024
db2325b
Skip the checkout test
a-masterov Oct 23, 2024
5ff7d63
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 23, 2024
a58a0e5
Skip the checkout test
a-masterov Oct 23, 2024
2913fea
Skip LFC tests if LFC is disabled
a-masterov Oct 23, 2024
29db545
Formatting
a-masterov Oct 23, 2024
837e4f5
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 24, 2024
3f7ca3a
Refactor the LFC infrastructure
a-masterov Oct 24, 2024
8fe0257
An attempt to modify workflows
a-masterov Oct 24, 2024
82036b6
Add comments
a-masterov Oct 24, 2024
b1c5da6
Remove assign to the variable, which will be reassigned later
a-masterov Oct 24, 2024
bc9bfb7
Change workflow
a-masterov Oct 24, 2024
ee7a46c
Fix workflow
a-masterov Oct 24, 2024
bf64309
USE_LFC variable
a-masterov Oct 24, 2024
d9ffcaa
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 25, 2024
89c2039
Modify allure report scheme
a-masterov Oct 25, 2024
0e7db59
Merge remote-tracking branch 'origin/bayandin/regress-tests-use-LFC' …
a-masterov Oct 25, 2024
f11bd7f
fix mypy warning
a-masterov Oct 25, 2024
def6d9f
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 25, 2024
d71ef11
Fix the detection of True
a-masterov Oct 28, 2024
74ec277
Merge remote-tracking branch 'origin/bayandin/regress-tests-use-LFC' …
a-masterov Oct 28, 2024
f797af3
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 28, 2024
825eefc
Add pg_reload_conf in the if block
a-masterov Oct 28, 2024
4313dd0
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 28, 2024
c95cf39
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 28, 2024
3f2f3bf
Change the default LCF size to 1Mb
a-masterov Oct 28, 2024
3fc13ca
Merge remote-tracking branch 'origin/bayandin/regress-tests-use-LFC' …
a-masterov Oct 28, 2024
6f06915
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 28, 2024
bdbf8dc
Add the default value to the `create table` definition
a-masterov Oct 28, 2024
47a8397
Change = true to != false for consistency
a-masterov Oct 28, 2024
dd398d0
Refactor the parameter name `lfc` to `lfc-state` and `pg-versions-lfc…
a-masterov Oct 29, 2024
d0d425e
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 29, 2024
1f32d61
Checks for correctness of LFC-related configuration in tests
a-masterov Oct 29, 2024
113b7de
Change the name for test cfg in the workflow
a-masterov Oct 29, 2024
19e2efb
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 29, 2024
5f3efb4
Fix the regex
a-masterov Oct 29, 2024
154373f
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 29, 2024
de8b436
Add for bytes
a-masterov Oct 29, 2024
865d173
Fix
a-masterov Oct 29, 2024
5e4ce41
Rename lfc config
a-masterov Oct 30, 2024
8a420a9
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 30, 2024
7953fd1
Try increase shared_buffers for the failing test
a-masterov Oct 31, 2024
67468ec
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Oct 31, 2024
522e640
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Nov 1, 2024
a555485
An attempt to make the code more readable
a-masterov Nov 1, 2024
d031731
refactor workflow
a-masterov Nov 1, 2024
e261b9b
add include
a-masterov Nov 1, 2024
a355c67
fix quotes
a-masterov Nov 1, 2024
5fb9ca6
fix names
a-masterov Nov 1, 2024
219ba53
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Nov 4, 2024
39d0b9a
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Nov 4, 2024
e3561ba
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Nov 4, 2024
59a2abc
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Nov 5, 2024
d8bd01d
Turn LFC off by default
a-masterov Nov 5, 2024
4eed077
Merge branch 'main' into bayandin/regress-tests-use-LFC
a-masterov Nov 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/_build-and-test-locally.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ on:
description: 'debug or release'
required: true
type: string
pg-versions:
description: 'a json array of postgres versions to run regression tests on'
pg-versions-lfc:
a-masterov marked this conversation as resolved.
Show resolved Hide resolved
description: 'a json object of postgres versions and lfc state to run regression tests on'
required: true
type: string

Expand Down Expand Up @@ -276,8 +276,7 @@ jobs:
options: --init --shm-size=512mb --ulimit memlock=67108864:67108864
strategy:
fail-fast: false
matrix:
pg_version: ${{ fromJson(inputs.pg-versions) }}
matrix: ${{ fromJSON(inputs.pg-versions-lfc) }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -300,6 +299,7 @@ jobs:
CHECK_ONDISK_DATA_COMPATIBILITY: nonempty
BUILD_TAG: ${{ inputs.build-tag }}
PAGESERVER_VIRTUAL_FILE_IO_ENGINE: tokio-epoll-uring
USE_LFC: ${{ matrix.lfc == 'lfc' && 'true' || 'false' }}
a-masterov marked this conversation as resolved.
Show resolved Hide resolved

# Temporary disable this step until we figure out why it's so flaky
# Ref https://github.com/neondatabase/neon/issues/4540
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ jobs:
build-tag: ${{ needs.tag.outputs.build-tag }}
build-type: ${{ matrix.build-type }}
# Run tests on all Postgres versions in release builds and only on the latest version in debug builds
pg-versions: ${{ matrix.build-type == 'release' && '["v14", "v15", "v16", "v17"]' || '["v17"]' }}
pg-versions-lfc: ${{ matrix.build-type == 'release' && matrix.arch == 'x64' && '{"include":[{"pg_version":"v14", "lfc":"lfc"},{"pg_version":"v15","lfc":"lfc"},{"pg_version":"v16","lfc":"lfc"},{"pg_version":"v17","lfc":"lfc"},{"pg_version":"v17","lfc":"nolfc"}]}' || '{"include":[{"pg_version":"v17","lfc":"lfc"}]}' }}
a-masterov marked this conversation as resolved.
Show resolved Hide resolved
secrets: inherit

# Keep `benchmarks` job outside of `build-and-test-locally` workflow to make job failures non-blocking
Expand Down
4 changes: 4 additions & 0 deletions scripts/ingest_regress_test_result-new-format.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
duration INT NOT NULL,
flaky BOOLEAN NOT NULL,
arch arch DEFAULT 'X64',
lfc BOOLEAN NOT NULL,
a-masterov marked this conversation as resolved.
Show resolved Hide resolved
build_type TEXT NOT NULL,
pg_version INT NOT NULL,
run_id BIGINT NOT NULL,
Expand All @@ -54,6 +55,7 @@ class Row:
duration: int
flaky: bool
arch: str
lfc: bool
build_type: str
pg_version: int
run_id: int
Expand Down Expand Up @@ -132,6 +134,7 @@ def ingest_test_result(
if p["name"].startswith("__")
}
arch = parameters.get("arch", "UNKNOWN").strip("'")
lfc = parameters.get("lfc", "False") == "True"

build_type, pg_version, unparametrized_name = parse_test_name(test["name"])
labels = {label["name"]: label["value"] for label in test["labels"]}
Expand All @@ -145,6 +148,7 @@ def ingest_test_result(
duration=test["time"]["duration"],
flaky=test["flaky"] or test["retriesStatusChange"],
arch=arch,
lfc=lfc,
build_type=build_type,
pg_version=pg_version,
run_id=run_id,
Expand Down
59 changes: 57 additions & 2 deletions test_runner/fixtures/neon_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
from fixtures.utils import (
ATTACHMENT_NAME_REGEX,
COMPONENT_BINARIES,
USE_LFC,
allure_add_grafana_links,
assert_no_errors,
get_dir_size,
Expand Down Expand Up @@ -3532,12 +3533,33 @@ def create(
self.pgdata_dir = self.env.repo_dir / path
self.logfile = self.endpoint_path() / "compute.log"

config_lines = config_lines or []

# set small 'max_replication_write_lag' to enable backpressure
# and make tests more stable.
config_lines = ["max_replication_write_lag=15MB"] + config_lines

# Delete file cache if it exists (and we're recreating the endpoint)
if USE_LFC:
if (lfc_path := Path(self.lfc_path())).exists():
lfc_path.unlink()
else:
lfc_path.parent.mkdir(parents=True, exist_ok=True)
# shared_buffers = 512kB to make postgres use LFC intensively
# neon.max_file_cache_size and neon.file_cache size limit are
# set to 512kB because small LFC is better for testing (helps to find more problems)
config_lines = [
"shared_buffers = 512kB",
f"neon.file_cache_path = '{self.lfc_path()}'",
"neon.max_file_cache_size = 512kB",
"neon.file_cache_size_limit = 512kB",
a-masterov marked this conversation as resolved.
Show resolved Hide resolved
] + config_lines
else:
config_lines = [
line
for line in config_lines
if not line.startswith("neon.max_file_cache_size")
and not line.startswith("neon.file_cache_size_limit")
]
a-masterov marked this conversation as resolved.
Show resolved Hide resolved

self.config(config_lines)

return self
Expand Down Expand Up @@ -3571,6 +3593,9 @@ def start(
basebackup_request_tries=basebackup_request_tries,
)
self._running.release(1)
self.log_config_value("shared_buffers")
self.log_config_value("neon.max_file_cache_size")
self.log_config_value("neon.file_cache_size_limit")
a-masterov marked this conversation as resolved.
Show resolved Hide resolved

return self

Expand All @@ -3596,6 +3621,10 @@ def config_file_path(self) -> Path:
"""Path to the postgresql.conf in the endpoint directory (not the one in pgdata)"""
return self.endpoint_path() / "postgresql.conf"

def lfc_path(self) -> Path:
"""Path to the lfc file"""
return self.endpoint_path() / "file_cache" / "file.cache"

def config(self, lines: list[str]) -> Endpoint:
"""
Add lines to postgresql.conf.
Expand Down Expand Up @@ -3784,8 +3813,34 @@ def clear_shared_buffers(self, cursor: Optional[Any] = None):
"""
if cursor is not None:
cursor.execute("select clear_buffer_cache()")
cursor.execute("SHOW neon.file_cache_size_limit")
res = cursor.fetchone()
assert res, "Cannot get neon.file_cache_size_limit"
file_cache_size_limit = res[0]
if file_cache_size_limit == 0:
return
cursor.execute("ALTER SYSTEM SET neon.file_cache_size_limit=0")
cursor.execute("SELECT pg_reload_conf()")
cursor.execute(f"ALTER SYSTEM SET neon.file_cache_size_limit='{file_cache_size_limit}'")
cursor.execute("SELECT pg_reload_conf()")
else:
self.safe_psql("select clear_buffer_cache()")
file_cache_size_limit = self.safe_psql_scalar(
"SHOW neon.file_cache_size_limit", log_query=False
)
if file_cache_size_limit == 0:
return
self.safe_psql("ALTER SYSTEM SET neon.file_cache_size_limit=0")
self.safe_psql("SELECT pg_reload_conf()")
self.safe_psql(f"ALTER SYSTEM SET neon.file_cache_size_limit='{file_cache_size_limit}'")
self.safe_psql("SELECT pg_reload_conf()")
a-masterov marked this conversation as resolved.
Show resolved Hide resolved

def log_config_value(self, param):
"""
Writes the config value param to log
"""
res = self.safe_psql_scalar(f"SHOW {param}", log_query=False)
log.info("%s = %s", param, res)


class EndpointFactory:
Expand Down
1 change: 1 addition & 0 deletions test_runner/fixtures/parametrize.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,6 @@ def pytest_runtest_makereport(*args, **kwargs):
}.get(os.uname().machine, "UNKNOWN")
arch = os.getenv("RUNNER_ARCH", uname_m)
allure.dynamic.parameter("__arch", arch)
allure.dynamic.parameter("__lfc", os.getenv("USE_LFC") == "true")
a-masterov marked this conversation as resolved.
Show resolved Hide resolved

yield
2 changes: 2 additions & 0 deletions test_runner/fixtures/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
)
# fmt: on

USE_LFC = os.environ.get("USE_LFC") != "false"


def subprocess_capture(
capture_dir: Path,
Expand Down
14 changes: 2 additions & 12 deletions test_runner/regress/test_combocid.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,7 @@

def do_combocid_op(neon_env_builder: NeonEnvBuilder, op):
env = neon_env_builder.init_start()
endpoint = env.endpoints.create_start(
"main",
config_lines=[
"shared_buffers='1MB'",
bayandin marked this conversation as resolved.
Show resolved Hide resolved
],
)
endpoint = env.endpoints.create_start("main")

conn = endpoint.connect()
cur = conn.cursor()
Expand Down Expand Up @@ -65,12 +60,7 @@ def test_combocid_lock(neon_env_builder: NeonEnvBuilder):

def test_combocid_multi_insert(neon_env_builder: NeonEnvBuilder):
env = neon_env_builder.init_start()
endpoint = env.endpoints.create_start(
"main",
config_lines=[
"shared_buffers='1MB'",
],
)
endpoint = env.endpoints.create_start("main")

conn = endpoint.connect()
cur = conn.cursor()
Expand Down
5 changes: 3 additions & 2 deletions test_runner/regress/test_explain_with_lfc_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

from pathlib import Path

import pytest
from fixtures.log_helper import log
from fixtures.neon_fixtures import NeonEnv
from fixtures.utils import USE_LFC


@pytest.mark.skipif(not USE_LFC, reason="LFC is disabled, skipping")
def test_explain_with_lfc_stats(neon_simple_env: NeonEnv):
env = neon_simple_env

Expand All @@ -16,8 +19,6 @@ def test_explain_with_lfc_stats(neon_simple_env: NeonEnv):
endpoint = env.endpoints.create_start(
"main",
config_lines=[
"shared_buffers='1MB'",
f"neon.file_cache_path='{cache_dir}/file.cache'",
"neon.max_file_cache_size='128MB'",
"neon.file_cache_size_limit='64MB'",
],
Expand Down
15 changes: 9 additions & 6 deletions test_runner/regress/test_lfc_resize.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations

import os
import random
import re
import subprocess
Expand All @@ -10,20 +9,24 @@
import pytest
from fixtures.log_helper import log
from fixtures.neon_fixtures import NeonEnv, PgBin
from fixtures.utils import USE_LFC


@pytest.mark.timeout(600)
@pytest.mark.skipif(not USE_LFC, reason="LFC is disabled, skipping")
def test_lfc_resize(neon_simple_env: NeonEnv, pg_bin: PgBin):
"""
Test resizing the Local File Cache
"""
env = neon_simple_env
cache_dir = env.repo_dir / "file_cache"
cache_dir.mkdir(exist_ok=True)
env.create_branch("test_lfc_resize")
endpoint = env.endpoints.create_start(
"main",
config_lines=[
"neon.file_cache_path='file.cache'",
"neon.max_file_cache_size=512MB",
"neon.file_cache_size_limit=512MB",
"neon.max_file_cache_size=1GB",
"neon.file_cache_size_limit=1GB",
],
)
n_resize = 10
Expand Down Expand Up @@ -63,8 +66,8 @@ def run_pgbench(connstr: str):
cur.execute("select pg_reload_conf()")
nretries = 10
while True:
lfc_file_path = f"{endpoint.pg_data_dir_path()}/file.cache"
lfc_file_size = os.path.getsize(lfc_file_path)
lfc_file_path = endpoint.lfc_path()
lfc_file_size = lfc_file_path.stat().st_size
res = subprocess.run(
["ls", "-sk", lfc_file_path], check=True, text=True, capture_output=True
)
Expand Down
9 changes: 5 additions & 4 deletions test_runner/regress/test_lfc_working_set_approximation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
import time
from pathlib import Path

import pytest
from fixtures.log_helper import log
from fixtures.neon_fixtures import NeonEnv
from fixtures.utils import query_scalar
from fixtures.utils import USE_LFC, query_scalar


@pytest.mark.skipif(not USE_LFC, reason="LFC is disabled, skipping")
def test_lfc_working_set_approximation(neon_simple_env: NeonEnv):
env = neon_simple_env

Expand All @@ -18,8 +20,6 @@ def test_lfc_working_set_approximation(neon_simple_env: NeonEnv):
endpoint = env.endpoints.create_start(
"main",
config_lines=[
"shared_buffers='1MB'",
f"neon.file_cache_path='{cache_dir}/file.cache'",
"neon.max_file_cache_size='128MB'",
"neon.file_cache_size_limit='64MB'",
],
Expand Down Expand Up @@ -72,9 +72,10 @@ def test_lfc_working_set_approximation(neon_simple_env: NeonEnv):
# verify working set size after some index access of a few select pages only
blocks = query_scalar(cur, "select approximate_working_set_size(true)")
log.info(f"working set size after some index access of a few select pages only {blocks}")
assert blocks < 10
assert blocks < 12


@pytest.mark.skipif(not USE_LFC, reason="LFC is disabled, skipping")
def test_sliding_working_set_approximation(neon_simple_env: NeonEnv):
env = neon_simple_env

Expand Down
6 changes: 3 additions & 3 deletions test_runner/regress/test_local_file_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
import threading
import time

import pytest
from fixtures.neon_fixtures import NeonEnvBuilder
from fixtures.utils import query_scalar
from fixtures.utils import USE_LFC, query_scalar


@pytest.mark.skipif(not USE_LFC, reason="LFC is disabled, skipping")
def test_local_file_cache_unlink(neon_env_builder: NeonEnvBuilder):
env = neon_env_builder.init_start()

Expand All @@ -19,8 +21,6 @@ def test_local_file_cache_unlink(neon_env_builder: NeonEnvBuilder):
endpoint = env.endpoints.create_start(
"main",
config_lines=[
"shared_buffers='1MB'",
f"neon.file_cache_path='{cache_dir}/file.cache'",
"neon.max_file_cache_size='64MB'",
"neon.file_cache_size_limit='10MB'",
],
Expand Down
8 changes: 7 additions & 1 deletion test_runner/regress/test_logical_replication.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,13 @@ def test_subscriber_synchronous_commit(neon_simple_env: NeonEnv, vanilla_pg):
# We want all data to fit into shared_buffers because later we stop
# safekeeper and insert more; this shouldn't cause page requests as they
# will be stuck.
sub = env.endpoints.create("subscriber", config_lines=["shared_buffers=128MB"])
sub = env.endpoints.create(
"subscriber",
config_lines=[
"neon.max_file_cache_size = 32MB",
"neon.file_cache_size_limit = 32MB",
],
)
sub.start()

with vanilla_pg.cursor() as pcur:
Expand Down
Loading