Skip to content

Commit

Permalink
fix: Add logging for session reuse and creation in CassandraOnlineStore
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhargav Dodla committed Jan 10, 2025
1 parent d7c7d13 commit ea661a1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ def _get_session(self, config: RepoConfig):
raise CassandraInvalidConfig(E_CASSANDRA_UNEXPECTED_CONFIGURATION_CLASS)

if self._session:
print("Reusing existing session..")
return self._session
else:
print("Creating a new session..")
if not self._session:
# configuration consistency checks
hosts = online_store_config.hosts
Expand Down Expand Up @@ -300,6 +303,8 @@ def _get_session(self, config: RepoConfig):
)

# creation of Session
if self._cluster.is_shard_aware():
print("connected to a scylla cluster")
self._keyspace = keyspace
self._session = self._cluster.connect(self._keyspace)

Expand Down

0 comments on commit ea661a1

Please sign in to comment.