OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomspace-rocks commits / 7c26bdf

Bug fix forced by AtomSpace design change.
Need to handle executable parents, too
7c26bdfad568e0e3f05f285aa22e7e16dbdec01d
by Linas Vepštas <linasvepstas@gmail.com> · 2026-01-21T07:48:37.000Z

Changed files (1) +18 -1

opencog/persist/rocks/RocksDAG.cc +18 -1
……@@ -159,7 +159,24 @@ Handle RocksStorage::decodeFrame(const std::string& senc)
159159 AtomSpacePtr asp = createAtomSpace(oset);
160160 asp->set_name(name);
161161 asp->set_copy_on_write();
162 return HandleCast(asp);
162
163 // Ugh. This feels slightly awkward, but I think it is correct.
164 // Add the current asp to the first parent; this will trigger a
165 // snowball that will install all the others too. It works this
166 // way because not all of the "parents" are actually AtomSpaces;
167 // they might be executable Atoms that return AtomSpaces. This
168 // is all handled in AtomSpace::install().
169 Handle hasp = HandleCast(asp);
170 for (const Handle& parent : oset)
171 {
172 if (ATOM_SPACE == parent->get_type())
173 {
174 AtomSpaceCast(parent)->add_atom(hasp);
175 break;
176 }
177 }
178
179 return hasp;
163180}
164181
165182/// Return the AtomSpacePtr corresponding to fid.