Skip to content

Sanitize workspace name used as Cassandra keyspace (#1043)#1052

Closed
01AtharvR wants to merge 2 commits into
trustgraph-ai:masterfrom
01AtharvR:fix-1043-sanitize-workspace-name
Closed

Sanitize workspace name used as Cassandra keyspace (#1043)#1052
01AtharvR wants to merge 2 commits into
trustgraph-ai:masterfrom
01AtharvR:fix-1043-sanitize-workspace-name

Conversation

@01AtharvR

Copy link
Copy Markdown
Contributor

What this fixes

Fixes #1043 — Cassandra keyspace creation failed intermittently when a workspace name contained characters outside [a-zA-Z0-9_] (e.g. hyphens), since the raw workspace string was interpolated unquoted into CQL.

Changes

Added sanitize_name() to EntityCentricKnowledgeGraph, matching the same pattern already used in rows/cassandra and row_embeddings/qdrant. self.keyspace is now sanitized at assignment time, so all CQL statements referencing it (create/drop/set keyspace) are safe.

Note

cybermaggedon mentioned this affects Qdrant too,happy to look at that as a follow-up if this approach looks right.

Fixes #1043

@github-actions

Copy link
Copy Markdown

Contributor License Agreement ✅

All contributors have signed the CLA. Thank you!

@01AtharvR

Copy link
Copy Markdown
Contributor Author

Closing in favor of #1053 ,opened a fresh branch to rule out any stray local state after a disconnect during editing.

@01AtharvR 01AtharvR closed this Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Intermittent collection deletion error

1 participant