mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-08-03 05:34:03 +02:00
add timings for syncing (#3798)
* add timings for syncing * add more logging * more debugging * refactor multipass/db check out of VespaIndex * circular imports? * more debugging * add logs * various improvements * additional logs to narrow down issue * use global httpx pool for the main vespa flows in celery. Use in more places eventually. * cleanup debug logging, etc * remove debug logging * this should use the secondary index * mypy * missed some logging * review fixes * refactor get_default_document_index to use search settings * more missed logging * fix circular refs --------- Co-authored-by: Richard Kuo (Danswer) <rkuo@onyx.app> Co-authored-by: pablodanswer <pablo@danswer.ai>
This commit is contained in:
@@ -25,6 +25,7 @@ from onyx.db.llm import fetch_default_provider
|
||||
from onyx.db.llm import update_default_provider
|
||||
from onyx.db.llm import upsert_llm_provider
|
||||
from onyx.db.persona import delete_old_default_personas
|
||||
from onyx.db.search_settings import get_active_search_settings
|
||||
from onyx.db.search_settings import get_current_search_settings
|
||||
from onyx.db.search_settings import get_secondary_search_settings
|
||||
from onyx.db.search_settings import update_current_search_settings
|
||||
@@ -70,8 +71,19 @@ def setup_onyx(
|
||||
The Tenant Service calls the tenants/create endpoint which runs this.
|
||||
"""
|
||||
check_index_swap(db_session=db_session)
|
||||
search_settings = get_current_search_settings(db_session)
|
||||
secondary_search_settings = get_secondary_search_settings(db_session)
|
||||
|
||||
active_search_settings = get_active_search_settings(db_session)
|
||||
search_settings = active_search_settings.primary
|
||||
secondary_search_settings = active_search_settings.secondary
|
||||
|
||||
# search_settings = get_current_search_settings(db_session)
|
||||
# multipass_config_1 = get_multipass_config(search_settings)
|
||||
|
||||
# secondary_large_chunks_enabled: bool | None = None
|
||||
# secondary_search_settings = get_secondary_search_settings(db_session)
|
||||
# if secondary_search_settings:
|
||||
# multipass_config_2 = get_multipass_config(secondary_search_settings)
|
||||
# secondary_large_chunks_enabled = multipass_config_2.enable_large_chunks
|
||||
|
||||
# Break bad state for thrashing indexes
|
||||
if secondary_search_settings and DISABLE_INDEX_UPDATE_ON_SWAP:
|
||||
@@ -122,10 +134,8 @@ def setup_onyx(
|
||||
# takes a bit of time to start up
|
||||
logger.notice("Verifying Document Index(s) is/are available.")
|
||||
document_index = get_default_document_index(
|
||||
primary_index_name=search_settings.index_name,
|
||||
secondary_index_name=secondary_search_settings.index_name
|
||||
if secondary_search_settings
|
||||
else None,
|
||||
search_settings,
|
||||
secondary_search_settings,
|
||||
)
|
||||
|
||||
success = setup_vespa(
|
||||
|
Reference in New Issue
Block a user