Skip to content

Commit

Permalink
[2.8] Fix sanitizer warning false leak in vecsim tests [MOD-6229] (#4335
Browse files Browse the repository at this point in the history
)

* add include for building in clang

(cherry picked from commit bd69603)

* increase GC threshold in tests where number of vectors > threshold to avoid false leaks in forks in sanitizer

(cherry picked from commit a6b7216)

* revert change in debug_commads.c

(cherry picked from commit 4abdb99)

---------

Co-authored-by: alon <alonreshef24@gmail.com>
  • Loading branch information
github-actions[bot] and alonre24 committed Jan 9, 2024
1 parent 7368bb3 commit 652096f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/pytests/test_vecsim.py
Expand Up @@ -689,8 +689,9 @@ def test_memory_info():
env.assertEqual(cur_vecsim_memory, cur_redisearch_memory)


def test_hybrid_query_batches_mode_with_text(env):
env = Env(moduleArgs='DEFAULT_DIALECT 2')
def test_hybrid_query_batches_mode_with_text():
# Set high GC threshold so to eliminate sanitizer warnings from of false leaks from forks (MOD-6229)
env = Env(moduleArgs='DEFAULT_DIALECT 2 FORK_GC_CLEAN_THRESHOLD 10000')
conn = getConnectionByEnv(env)
# Index size is chosen so that batches mode will be selected by the heuristics.
dim = 2
Expand Down Expand Up @@ -768,7 +769,8 @@ def test_hybrid_query_batches_mode_with_text(env):


def test_hybrid_query_batches_mode_with_tags():
env = Env(moduleArgs='DEFAULT_DIALECT 2')
# Set high GC threshold so to eliminate sanitizer warnings from of false leaks from forks (MOD-6229)
env = Env(moduleArgs='DEFAULT_DIALECT 2 FORK_GC_CLEAN_THRESHOLD 10000')
conn = getConnectionByEnv(env)
# Index size is chosen so that batches mode will be selected by the heuristics.
dim = 2
Expand Down Expand Up @@ -1163,7 +1165,8 @@ def test_wrong_vector_size():


def test_hybrid_query_cosine():
env = Env(moduleArgs='DEFAULT_DIALECT 2')
# Set high GC threshold so to eliminate sanitizer warnings from of false leaks from forks (MOD-6229)
env = Env(moduleArgs='DEFAULT_DIALECT 2 FORK_GC_CLEAN_THRESHOLD 10000')
conn = getConnectionByEnv(env)
dim = 4
index_size = 6000 * env.shardsCount
Expand Down Expand Up @@ -1279,7 +1282,8 @@ def test_fail_on_v1_dialect():


def test_hybrid_query_with_global_filters():
env = Env(moduleArgs='DEFAULT_DIALECT 2')
# Set high GC threshold so to eliminate sanitizer warnings from of false leaks from forks (MOD-6229)
env = Env(moduleArgs='DEFAULT_DIALECT 2 FORK_GC_CLEAN_THRESHOLD 10000')
conn = getConnectionByEnv(env)
dim = 2
index_size = 1000
Expand Down

0 comments on commit 652096f

Please sign in to comment.