#920 mod_storage_internal archive does not behave like other modules when querying an empty archive
Reporter
Link Mauve
Owner
Zash
Created
Updated
Stars
★ (1)
Tags
Priority-Medium
Status-Fixed
Milestone-0.10
Type-Defect
Link Mauve
on
What steps will reproduce the problem?
1. Don’t have any message in your MAM archive.
2. Query the MAM archive.
What is the expected output? What do you see instead?
An empty <fin/> element, with a <set/> of count 0.
Instead I see an <internal-server-error/> error.
What version of the product are you using? On what operating system?
Trunk 4720f5ec4171 on Lua 5.2 on ArchLinux.
Please provide any additional information below.
mod_mam.lua line 146 is the issue, it should check whether the error is that nothing has been logged.
Zash
on
Indeed.
It could be argued that it is the internal storage driver behaving unlike others, which would return a noop iterator in this case.
titleDon’t consider an empty MAM archive as an internal-server-error mod_storage_internal archive does not behave like other modules when querying an empty archive
What steps will reproduce the problem? 1. Don’t have any message in your MAM archive. 2. Query the MAM archive. What is the expected output? What do you see instead? An empty <fin/> element, with a <set/> of count 0. Instead I see an <internal-server-error/> error. What version of the product are you using? On what operating system? Trunk 4720f5ec4171 on Lua 5.2 on ArchLinux. Please provide any additional information below. mod_mam.lua line 146 is the issue, it should check whether the error is that nothing has been logged.
Indeed. It could be argued that it is the internal storage driver behaving unlike others, which would return a noop iterator in this case.
ChangesFixed in https://hg.prosody.im/0.10/rev/3ff99d49082f Thanks!
ChangesDon’t consider an empty MAM archive as an internal-server-errormod_storage_internal archive does not behave like other modules when querying an empty archive