Issue 156 in soar: epmem -- close is no longer implemented

0 views
Skip to first unread message

so...@googlecode.com

unread,
Mar 25, 2014, 1:57:57 PM3/25/14
to soar-...@googlegroups.com
Status: New
Owner: justinn...@gmail.com
Labels: Type-Defect Priority-Medium

New issue 156 by marin...@gmail.com: epmem -- close is no longer implemented
http://code.google.com/p/soar/issues/detail?id=156

epmem --close used to work (I used it in late 2012). It seems to not be
implemented any more. Please restore this!

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

so...@googlecode.com

unread,
Mar 25, 2014, 2:03:30 PM3/25/14
to soar-...@googlegroups.com

Comment #1 on issue 156 by justinn...@gmail.com: epmem -- close is no
longer implemented
http://code.google.com/p/soar/issues/detail?id=156

What is the expected behavior of close?

I don't think I've done any extensive modification to epmem since late
2011, so maybe this change came from Mazin's work with the LTMs?

so...@googlecode.com

unread,
Mar 25, 2014, 2:09:26 PM3/25/14
to soar-...@googlegroups.com

Comment #2 on issue 156 by nate.der...@gmail.com: epmem -- close is no
longer implemented
http://code.google.com/p/soar/issues/detail?id=156

Reading the notes from r13788, it appears that Mazin has replaced --close
with --init: the code is still in episodic_memory.cpp/h, but that the CLI
no longer exposes the functionality.

so...@googlecode.com

unread,
Mar 25, 2014, 2:10:26 PM3/25/14
to soar-...@googlegroups.com

Comment #3 on issue 156 by marin...@gmail.com: epmem -- close is no longer
implemented
http://code.google.com/p/soar/issues/detail?id=156

Close closes the database connection. It effectively forces everything to
flush and releases any handles to the file so that the database can then be
opened by another agent, copied, etc. (I think it may only make sense for
on-disk databases.) I believe this is a sqlite operation, but I'm not sure.

If I try to do it now (on the trunk), I just get an error message saying
there is no such option.

so...@googlecode.com

unread,
Mar 25, 2014, 2:21:22 PM3/25/14
to soar-...@googlegroups.com
Updates:
Owner: maz...@gmail.com

Comment #4 on issue 156 by justinn...@gmail.com: epmem -- close is no
longer implemented
http://code.google.com/p/soar/issues/detail?id=156

Assigning this to Mazin instead.

so...@googlecode.com

unread,
Mar 25, 2014, 2:23:14 PM3/25/14
to soar-...@googlegroups.com

Comment #5 on issue 156 by maz...@gmail.com: epmem -- close is no longer
implemented
http://code.google.com/p/soar/issues/detail?id=156

Yes, it did happen in Jan 2013 when we changed the schema around. It may
be related to how we handled changes to the memory/file/append settings and
how the database was initialized. It may be that we thought the proper way
for a user to close the database file and leave epmem in a valid state was
to switch to memory mode or to turn off epmem. I'll check it out. If
that's the case, we could always add the old command back and have it do
one of those two things.

btw, if you're looking for that command because you're debugging a crash
and want to insure all data gets flushed, maybe it makes more sense to add
the previous close command as a debug command instead and not make it
visible to the typical user.

Note that there is a re-init command that will first close the database and
then re-open it. This could be a workaround for now. Just make sure the
append database setting is on, otherwise it will empty the tables when it
re-opens them.

so...@googlecode.com

unread,
Mar 25, 2014, 2:24:14 PM3/25/14
to soar-...@googlegroups.com

Comment #6 on issue 156 by marin...@gmail.com: epmem -- close is no longer
implemented
http://code.google.com/p/soar/issues/detail?id=156

Looks like this was removed in r13783. The underlying function
(epmem_close) is still in episodic_memory.cpp, but the --close option was
removed from cli_epmem.cpp:

http://code.google.com/p/soar/source/detail?r=13783

so...@googlecode.com

unread,
Mar 25, 2014, 2:26:25 PM3/25/14
to soar-...@googlegroups.com

Comment #7 on issue 156 by marin...@gmail.com: epmem -- close is no longer
implemented
http://code.google.com/p/soar/issues/detail?id=156

My use case is actually for unit testing where multiple agents may want to
use the same epmem database file in sequence, and we need to guarantee that
the previous agent has released it before the next one tries to open it.
(This is what we used it for in 2012.)

so...@googlecode.com

unread,
Mar 26, 2014, 3:59:19 PM3/26/14
to soar-...@googlegroups.com

Comment #8 on issue 156 by maz...@gmail.com: epmem -- close is no longer
implemented
http://code.google.com/p/soar/issues/detail?id=156

I added the command back. Note that stepping again will reinitialize the
database. So, if you have it set to not append to the database, it will
erase the current contents. You may want to turn append on, turn episodic
memory off or switch to memory mode when using the close command.

so...@googlecode.com

unread,
Mar 26, 2014, 4:00:19 PM3/26/14
to soar-...@googlegroups.com
Updates:
Status: Fixed

Comment #9 on issue 156 by maz...@gmail.com: epmem -- close is no longer
implemented
http://code.google.com/p/soar/issues/detail?id=156

(No comment was entered for this change.)

so...@googlecode.com

unread,
Mar 26, 2014, 4:03:22 PM3/26/14
to soar-...@googlegroups.com

Comment #10 on issue 156 by bob.mari...@soartech.com: epmem -- close is no
longer implemented
http://code.google.com/p/soar/issues/detail?id=156

Thanks Mazin! These additional notes about --close would be great to
include in the documentation (see issue 152)
Reply all
Reply to author
Forward
0 new messages