| … | … | @@ -542,6 +542,10 @@ Handle MonoStorage::findAlpha(const Handle& h, const std::string& shash, |
| 542 | 542 | void MonoStorage::removeAtom(AtomSpace* as, const Handle& h, bool recursive) |
| 543 | 543 | { |
| 544 | 544 | 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 | ||
| 545 | 549 | #ifdef HAVE_DELETE_RANGE |
| 546 | 550 | rocksdb::Slice start, end; |
| 547 | 551 | _rfile->DeleteRange(rocksdb::WriteOptions(), start, end); |
| … | … | @@ -817,6 +817,10 @@ void RocksStorage::removeAtom(AtomSpace* frame, const Handle& h, bool recursive) |
| 817 | 817 | void RocksStorage::doRemoveAtom(const Handle& h, bool recursive) |
| 818 | 818 | { |
| 819 | 819 | 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 | ||
| 820 | 824 | #ifdef HAVE_DELETE_RANGE |
| 821 | 825 | rocksdb::Slice start, end; |
| 822 | 826 | _rfile->DeleteRange(rocksdb::WriteOptions(), start, end); |