OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomspace-rocks commits / f7926d5

Must not delete atos that are in use as keys.
f7926d5a3a642b88eef400b06a9cf1b490b4c0b7
by Linas Vepstas <linasvepstas@gmail.com> · 2025-12-09T00:24:19.000Z

Changed files (2) +8 -0

opencog/persist/monospace/MonoIO.cc +4 -0
……@@ -542,6 +542,10 @@ Handle MonoStorage::findAlpha(const Handle& h, const std::string& shash,
542542void MonoStorage::removeAtom(AtomSpace* as, const Handle& h, bool recursive)
543543{
544544 CHECK_OPEN;
545
546 // Refuse to delete atoms that are in use as keys or messages.
547 if (h->isKey() or h->isMessage()) return;
548
545549#ifdef HAVE_DELETE_RANGE
546550 rocksdb::Slice start, end;
547551 _rfile->DeleteRange(rocksdb::WriteOptions(), start, end);
opencog/persist/rocks/RocksIO.cc +4 -0
……@@ -817,6 +817,10 @@ void RocksStorage::removeAtom(AtomSpace* frame, const Handle& h, bool recursive)
817817void RocksStorage::doRemoveAtom(const Handle& h, bool recursive)
818818{
819819 CHECK_OPEN;
820
821 // Refuse to delete atoms that are in use as keys or messages.
822 if (h->isKey() or h->isMessage()) return;
823
820824#ifdef HAVE_DELETE_RANGE
821825 rocksdb::Slice start, end;
822826 _rfile->DeleteRange(rocksdb::WriteOptions(), start, end);