Skip to content

[module_base] Change state db connector to be lazy initialized#612

Merged
judyjoseph merged 1 commit intosonic-net:masterfrom
gpunathilell:state_db_init
Dec 2, 2025
Merged

[module_base] Change state db connector to be lazy initialized#612
judyjoseph merged 1 commit intosonic-net:masterfrom
gpunathilell:state_db_init

Conversation

@gpunathilell
Copy link
Copy Markdown
Contributor

Description

Initialize state_db entry only when needed
The module_base implementation for state_db connector is used only in smartswitch platforms. To prevent test failures in platform code (because redis dbs are not initialized for platform tests) The module base implementation is changed to initialize the state_db connector only when needed

Motivation and Context

How Has This Been Tested?

Additional Information (Optional)

Signed-off-by: gpunathilell <gpunathilell@nvidia.com>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

@vvolam vvolam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the quick fix.

@gpunathilell
Copy link
Copy Markdown
Contributor Author

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202511: #614

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants