Reload and NoSyncReload have duplicated code, this unifies both
for later refactoring.
This PR is split from #786, where the tests found differences on reloading
and nil/empty initializations. Added some more clarifications in godocs
for certain panic behavior and expected returns on the interface.
Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
This also rectifies a bunch of nil/empty differences between the
implementation that show up during init and page releases.
Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
This reorders some statements in the hashmap initialization to ensure we
always start fresh, even when no pageids were passed to it.
fixes#791
Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>
This introduces an interface for the freelist, splits it into two concrete
implementations.
fixes etcd-io#773
Signed-off-by: Thomas Jungblut <tjungblu@redhat.com>