jack 1 mēnesi atpakaļ
vecāks
revīzija
ee6e0cca59

+ 3 - 0
py/core/main/services/management_service.py

@@ -578,13 +578,16 @@ class ManagementService(Service):
         )
 
     async def delete_collection(self, collection_id: UUID) -> bool:
+        logger.info(f"Deleting collection {collection_id}")
         await self.providers.database.collections_handler.delete_collection_relational(
             collection_id
         )
+        logger.info(f"Deleting collection {collection_id} from chunks")
         await self.providers.database.chunks_handler.delete_collection_vector(
             collection_id
         )
         try:
+            logger.info(f"Deleting collection {collection_id} from graph")
             await self.providers.database.graphs_handler.delete(
                 collection_id=collection_id,
             )

+ 3 - 1
py/core/providers/database/collections.py

@@ -260,10 +260,12 @@ class PostgresCollectionsHandler(Handler):
             SET collection_ids = array_remove(collection_ids, $1)
             WHERE $1 = ANY(collection_ids)
         """
+        logger.info(f"Deleting collection {collection_id} from users")
         await self.connection_manager.execute_query(
             user_update_query, [collection_id]
         )
 
+        logger.info(f"Deleting collection1 {collection_id} from documents")
         # Remove collection_id from documents
         document_update_query = f"""
             WITH updated AS (
@@ -277,7 +279,7 @@ class PostgresCollectionsHandler(Handler):
         await self.connection_manager.fetchrow_query(
             document_update_query, [collection_id]
         )
-
+        logger.info(f"Deleting collection2 {collection_id} from documents")
         # Delete the collection
         delete_query = f"""
             DELETE FROM {self._get_table_name(PostgresCollectionsHandler.TABLE_NAME)}