Skip to content


Issue with deleted values #74

samoht opened this Issue · 3 comments

1 participant

MirageOS member

from @gregtatcam

I ran into some Irmin issues in my IMAP server which I think are related to my misunderstanding of the API. I implemented interface to Irmin as transactions via the views. I have attached an example where I create the top level key ["imaplet";"user";"mailboxes";"Test”], then I get the view and create keys/values in that view ["messages";"1”], ["messages";"1";"header”], ["messages";"1";"content”]. I commit the view with update and then read the values back for verification. Then I remove the top level key ["messages";"1”] and test each key with mem, read, and then I also list the whole tree under ["messages";"1”]. I get results which I don’t quite understand. Here is the matrix that I get

                                     mem    read
messages;1                  true      no
messages;1;header      false     yes
messages;1;content     false      yes

And then the listing under messages;1 returns header and content keys. If I delete messages;1;content and messages;1;header then I can’t read then any longer but mem still returns true and the listing doesn’t return header and content keys. In my IMAP server I have the messages structured in such a way that there is a bunch of sub keys under the message UID keys, like header, content, etc. So, ideally I would like to remove the top level key, basically messages;UID and don’t bother with the removal of all the sub keys. I also would have expected that mem returns false for the removed key. Would you have some time to take a look at the example and explain if and what I’m doing wrong?

MirageOS member

@djs55 this seems similar to the issue you got in xenstore. Don't remember what was wrong exactly.

@samoht samoht added the bug label
MirageOS member

Should be fixed in master

MirageOS member

(I guess you want to use the new remove_rec in that case)

@samoht samoht closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.