graphiti/graphiti_core/driver
supmo668 a65634c2e1 fix: Handle EquivalentSchemaRuleAlreadyExists errors in Neo4j driver
Fixes #1079

Neo4j 5.26+ throws EquivalentSchemaRuleAlreadyExists errors when
creating indices in parallel, even with IF NOT EXISTS clause.

This fix:
- Catches neo4j.exceptions.ClientError exceptions
- Checks for EquivalentSchemaRuleAlreadyExists error code
- Logs the occurrence as info instead of error
- Returns empty result to indicate success (index/constraint exists)

This prevents the MCP server from crashing on startup when multiple
CREATE INDEX IF NOT EXISTS queries run concurrently via semaphore_gather.

The solution follows the same pattern already implemented in the
FalkorDB driver for handling "already indexed" errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 19:21:55 -08:00
..
graph_operations feat: MCP Server v1.0.0 - Modular architecture with multi-provider support (#1024) 2025-10-30 22:59:01 -07:00
search_interface feat: MCP Server v1.0.0 - Modular architecture with multi-provider support (#1024) 2025-10-30 22:59:01 -07:00
__init__.py Refactor imports (#675) 2025-07-05 08:57:07 -07:00
driver.py [Improvement] Add GraphID isolation support for FalkorDB multi-tenant architecture (#835) 2025-11-03 10:56:53 -05:00
falkordb_driver.py [Improvement] Add GraphID isolation support for FalkorDB multi-tenant architecture (#835) 2025-11-03 10:56:53 -05:00
kuzu_driver.py [Doc]: fixing typos in various files (#1067) 2025-11-15 08:58:49 -08:00
neo4j_driver.py fix: Handle EquivalentSchemaRuleAlreadyExists errors in Neo4j driver 2025-11-23 19:21:55 -08:00
neptune_driver.py Implement build_indices_and_constraints for Kuzu and Neptune drivers (#1048) 2025-11-05 11:51:59 -05:00