GNOME Bugzilla – Bug 392307
Beagle should not store indexes in users home directory
Last modified: 2007-01-03 18:55:48 UTC
Forwarded from https://launchpad.net/ubuntu/+source/beagle/+bug/77768 By default Beagle should not store indexes in a user's home directory. In *many* cases, home directories are not local file systems, but either NFS or AFS mounted. The data Beagle uses (including it's own socket) is cache data. It can be destroyed without harm. The data is also system specific. It would be better of Beagle stored it's data in a directory like /var/cache/beagle/indexes/$username.$rnd using basic temporary directory name allocation methods: find an existing directory $uid.*, check owner, if not create a new one. This would allow beagle to maintain it's own data per-system the user logs into, as well as making it part of the system policy that the data can actually be deleted. It would also allow beagle to function out of the box on remotely mounted ~ directories.
(In reply to comment #0) > Forwarded from https://launchpad.net/ubuntu/+source/beagle/+bug/77768 > can be destroyed without harm. The data is also system specific. The data is specific to the files in users home directory. Hence it makes more sense to me to keep the index with the files. For system data, static indexes are supposed to be used. > It would be better of Beagle stored it's data in a directory like > /var/cache/beagle/indexes/$username.$rnd using basic temporary directory name You can override where beagle stores its data. Check http://beagle-project.org/Environment_Variables for the environment variable BEAGLE_STORAGE
I'm gonna mark this as a wontfix, as we already have static indexes for system wide stuff, and env vars for the small population that doesn't want their indexes in their home directory.
It's also worth noting that Beagle detects whether or not it is running on a local filesystem. If it's remote, a temporary directory in /tmp is created, and beagle stores its socket there. Beagle also uses it for storing and searching its index there for speed/bandwidth efficiency, and checkpoints the index back to the home directory every once in a while. I don't think that storing them in /var/cache is the right thing to do; that is generally reserved for system-level tools and isn't writable by users. There is a potential for index version mismatches if the home directory is shared between machines that have different Beagle versions. In this case the right thing to do isn't so clear. Storing user data in separate indexes is a waste of space when this isn't the case, because the indexes contain essentially the same data. However, blowing away the existing index and reindexing is also suboptimal.