You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in index.go the "github.com/tysontate/gommap" package does not exist and should be replaced with "github.com/tysonmote/gommap" (or alternatively - "github.com/edsrzf/mmap-go")
The unit test segment_test.go does not close the segment before re-opening it. This leaks the mmaped file handles (at least on Windows) which results in test failure when calling s.Remove() (unable to truncate a mmaped file). The segment must be closed (s.Close()) before calling s, err = newSegment(dir, 16, c) for the test to pass.
The text was updated successfully, but these errors were encountered:
Another (potential) problem I found when testing index struct using gommap is that in Close method, before truncating the file to its actual size, we must issue an i.mmap.UnsafeUnmap() call; otherwise we could get a PathError: The requested operation cannot be performed on a file with a user-mapped section open.
Two problems:
index.go
the"github.com/tysontate/gommap"
package does not exist and should be replaced with"github.com/tysonmote/gommap"
(or alternatively -"github.com/edsrzf/mmap-go"
)segment_test.go
does not close the segment before re-opening it. This leaks the mmaped file handles (at least on Windows) which results in test failure when callings.Remove()
(unable to truncate a mmaped file). The segment must be closed (s.Close()
) before callings, err = newSegment(dir, 16, c)
for the test to pass.The text was updated successfully, but these errors were encountered: