On Jan 3, 2012, at 2:55 PM, Marko Lukša wrote:
Hey guys.
Aleš Justin and I will be using infinispan's grid file system for Capedwarf.
What's Capedwarf? :)
I have fixed a few issues in GFS. Before I issue a pull request, I need
to know if you guys prefer a single commit for all of them or separate
commits. What about jira issues - separate or one single jira issue?
Hmmmm, I think it might be a quite a PITA to create individual jiras. I'd suggest
creating one for GridFS improvements and mark it for 5.1.0.CR3.
Here's a list of my commits:
- Implement appending to files (up to now, the append parameter was ignored)
- Implement GridFile.getParent() and getParentFile()
- Implement GridFile.lastModified()
- Prevent writing to and reading from directories
- Fix bugs related to non-default chunk size
- Leak when overwriting existing file with shorter content length
(excess file chunks are never removed from cache)
- Leak when calling GridFile.delete() (removes only file metadata, but
not the actual file contents)
- GridFile.createNewFile() does not honor the contract of
File.createNewFile()
- GridFile.list() does not honor contract of File.list() and also has a
few bugs (it doesn't handle file separators correctly)
- GridFilesystem.getFile(File, String) creates File with illegal path
(on windows, the created file begins with "C:\...")
- mkdir() fails on "/dir", but works on "dir"
- the root dir is not handled properly
- add javadoc to GridFilesystem
There are also a few other things. Before I fix them, I would like you
to confirm my thinking is correct:
- GFS.getFile("/hello.txt") should point to the same file as
GFS.getFile("hello.txt"), but it currently does not. GFS treats these
two as two distinct files.
Hmmm, I can't see how base paths can be passed to GFS on construction, but if they
were possible, those two would only be equals if the base path was root (/).
If those paths are meant to be absolute paths, then yes, they'd be the same file.
- GridFilesystem.remove() shouldn't be public, because the proper
way to
remove files is through GridFile.delete(). By calling
GridFilesystem.remove(), only the file's contents are removed, but the
metadata is not).
+1
- GridFile.setLength() should throw an exception instead of printing
to
System.err
+1
ML
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Galder Zamarreño
Sr. Software Engineer
Infinispan, JBoss Cache