omec-project / smf

9 stars 33 forks source link

feat: use DRSM only when database is enabled #305

Closed dariofaccin closed 6 days ago

dariofaccin commented 1 week ago

This PR aims to initialise DRSM library only when EnableDbStore config option is enabled. DRSM library is used to create mappings between an SMF instance and its owned resources (TEID, etc). This allows, in presence of multiple SMFs, to redirect messages between instances. Each SMF instance owns a chunk in a MongoDB sharded mongodb (cluster or instance). When EnableDbStore option is disabled, no mongoDB instance is expected to be deployed and available to SMF, therefore DRSM library should not be initialized in such scenario. This implies that only a single SMF instance can be used when EnableDbStore is disabled. Main changes:

gab-arrobo commented 6 days ago

@dariofaccin, I guess tested these changes when the DB is disabled, correct?

dariofaccin commented 5 days ago

@gab-arrobo sorry for the late reply. It was tested with both DB enabled and disabled. Thanks