- 14 Aug, 2013 1 commit
-
-
Vicent Marti committed
-
- 25 Jul, 2013 1 commit
-
-
This fixes a regression introduced in revision 9d2f841a. Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed
-
- 15 Jul, 2013 1 commit
-
-
Rémi Duraffort committed
-
- 31 May, 2013 2 commits
-
-
It is obviously quite a serious problem if this happens, but mutex initialization can fail and we should detect it. It's a bit like a memory allocation failure, in that you're probably pretty screwed if this occurs, but at least we'll catch it.
Russell Belfer committed -
By zeroing out the memory when we free larger objects (i.e. those that serve as collections of other data, such as repos, odb, refdb), I'm hoping that it will be easier for libgit2 bindings to find errors in their object management code.
Russell Belfer committed
-
- 02 May, 2013 4 commits
-
-
We use p->index_map.data to check whether the struct has been set up and all the information about the index is stored there. This variable gets set up halfway through the setup process, however, and a thread can come along and use fields that haven't been written to yet. Crucially, pack_entry_find_offset() needs to read the index version (which is written after index_map) to know the offset and stride length to pass to sha1_entry_pos(). If these values are wrong, assertions in it will fail, as it will be reading bogus data. Make index_version the last field to be written and switch from using p->index_map.data to p->index_version as "git_pack_file is ready" flag as we can use it to know if every field has been written.
Carlos Martín Nieto committed -
This reverts commit 8c535f3f.
Carlos Martín Nieto committed -
There is an occasional assertion failure in sha1_entry_pos from pack_entry_find_index when running threaded. Holding the mutex around the code that grabs the index_map data and processes it makes this assertion failure go away.
Russell Belfer committed -
We were still seeing a few issues in threaded access to packs. This adds extra locks around the opening of the mwindow to avoid a different race.
Russell Belfer committed
-
- 29 Apr, 2013 1 commit
-
-
Russell Belfer committed
-
- 22 Apr, 2013 4 commits
-
-
Rename git_packfile_check to git_packfile_alloc since it is now being used more in that capacity. Fix the various places that use it. Consolidate some repeated code in odb_pack.c related to the allocation of a new pack_backend.
Russell Belfer committed -
The indexer was creating a packfile object separately from the code in pack.c which was a problem since I put a call to git_mutex_init into just pack.c. This commit updates the pack function for creating a new pack object (i.e. git_packfile_check()) so that it can be used in both places and then makes indexer.c use the shared initialization routine. There are also a few minor formatting and warning message fixes.
Russell Belfer committed -
This builds on the earlier thread safety work to make it so that setting the odb, index, refdb, or config for a repository is done in a threadsafe manner with minimized locking time. This is done by adding a lock to the repository object and using it to guard the assignment of the above listed pointers. The lock is only held to assign the pointer value. This also contains some minor fixes to the other work with pack files to reduce the time that locks are being held to and fix an apparently memory leak.
Russell Belfer committed -
When I was writing threading tests for the new cache, the main error I kept running into was a pack file having it's content unmapped underneath the running thread. This adds a lock around the routines that map and unmap the pack data so that threads can effectively reload the data when they need it. This also required reworking the error handling paths in a couple places in the code which I tried to make consistent.
Russell Belfer committed
-
- 03 Mar, 2013 1 commit
-
-
These offsets are needed for REF_DELTA objects, which encode which object they use as a base, but not where it lies in the packfile, so we need a list. These objects are mostly from older packfiles, before OFS_DELTA was widely spread. The time spent in indexing these packfiles is greatly reduced, though remains above what git is able to do.
Carlos Martín Nieto committed
-
- 27 Jan, 2013 1 commit
-
-
Philip Kelley committed
-
- 26 Jan, 2013 1 commit
-
-
Philip Kelley committed
-
- 14 Jan, 2013 2 commits
-
-
Somewhat surprisingly, this can increase the speed considerably, as we don't bother trying to decide what to evict, and the most used entries are quickly back into the cache.
Carlos Martín Nieto committed -
This drops the cache eviction below libcrypto and zlib in the perf output. The number has been chosen empirically.
Carlos Martín Nieto committed
-
- 12 Jan, 2013 2 commits
-
-
The offset should be git_off_t, and we should check the return value of the mutex lock function.
Carlos Martín Nieto committed -
The indexer needs to call the packfile's free function so it takes care of freeing the caches. We still need to close the mwf descriptor manually so we can rename the packfile into its final name on Windows.
Carlos Martín Nieto committed
-
- 11 Jan, 2013 7 commits
-
-
This reverts commit f289f886, which makes the tests fail on Windows. Revert until we can figure out a solution.
Carlos Martín Nieto committed -
nulltoken committed
-
It turns out the indexers have been ignoring the pack's free function and leaking data. Plug that.
Carlos Martín Nieto committed -
Currently limited to 16MB (like git) and to objects up to 1MB in size.
Carlos Martín Nieto committed -
Carlos Martín Nieto committed
-
Carlos Martín Nieto committed
-
Many delta bases are re-used. Cache them to avoid inflating the same data repeatedly. This version doesn't limit the amount of entries to store, so it can end up using a considerable amound of memory.
Carlos Martín Nieto committed
-
- 08 Jan, 2013 1 commit
-
-
Edward Thomson committed
-
- 02 Dec, 2012 1 commit
-
-
To paraphrase @peff: You can get both size and type from a packed object reasonably cheaply. If you have: * An object that is not a delta; both type and size are available in the packfile header. * An object that is a delta. The packfile type will be OBJ_*_DELTA, and you have to resolve back to the base to find the real type. That means potentially a lot of packfile index lookups, but each one is relatively cheap. For the size, you inflate the first few bytes of the delta, whose header will tell you the resulting size of applying the delta to the base. For simplicity, we just decompress the whole delta for now.
David Michael Barr committed
-
- 30 Nov, 2012 1 commit
-
-
This allows us to take objects from the packfile as a stream instead of having to keep it all in memory.
Carlos Martín Nieto committed
-
- 27 Nov, 2012 1 commit
-
-
This makes the first OID param of the ODB callback a const pointer and also propogates that change all the way to the backends.
Russell Belfer committed
-
- 24 Nov, 2012 1 commit
-
-
If p->mwf.fd is e.g. -2 then it is closed in packfile_free and an exception might be thrown. Signed-off-by: Sven Strickroth <email@cs-ware.de>
Sven Strickroth committed
-
- 23 Nov, 2012 1 commit
-
-
Remove words such as fuck, crap, shit etc. Remove other potentially offensive words from comments. Tidy up other geopolicital terms in comments.
Martin Woodward committed
-
- 14 Sep, 2012 1 commit
-
-
Compute the ordering on demand and persist until the index is freed.
David Michael Barr committed
-
- 04 Aug, 2012 1 commit
-
-
This updates all the `foreach()` type functions across the library that take callbacks from the user to have a consistent behavior. The rules are: * A callback terminates the loop by returning any non-zero value * Once the callback returns non-zero, it will not be called again (i.e. the loop stops all iteration regardless of state) * If the callback returns non-zero, the parent fn returns GIT_EUSER * Although the parent returns GIT_EUSER, no error will be set in the library and `giterr_last()` will return NULL if called. This commit makes those changes across the library and adds tests for most of the iteration APIs to make sure that they follow the above rules.
Russell Belfer committed
-
- 24 Jul, 2012 1 commit
-
-
nulltoken committed
-
- 03 Jul, 2012 1 commit
-
-
Go through each backend and list every objects that exists in them. This allows fsck-like uses.
Carlos Martín Nieto committed
-
- 28 Jun, 2012 1 commit
-
-
Once a file is registered, there is no way to deregister it, even after the structure that contains it is no longer needed and has been freed. This may be the source of #624. Allow and use the deregister function to remove our file from the global list.
Carlos Martin Nieto committed
-
- 12 Jun, 2012 1 commit
-
-
On RAM: the .idx and .pack files become links to a .lock and the original download respectively. Assume some feature (such as record locking) supported by SFS but not JXFS or RAM: is required.
Chris Young committed
-