https://github.com/voldemort/voldemort
Revision f7303dfa61d8c5fbbaeee29a56ed3ec2d64b8e6e authored by Felix GV on 16 October 2015, 22:47:38 UTC, committed by Felix GV on 19 October 2015, 19:23:46 UTC
If index or data files are somehow corrupted, or mismatched (meaning that the index file from one store/version gets used in combination with a data file for another store/version), then the server gets into bad buffer allocation problems, causing IllegalArgumentExceptions and potentially OOMing in the process. This commit makes it easier to debug the issues and protect against the OOMs. Changes include: - Disallow allocation of negative size buffers. - Disallow allocation of excessively large value buffers (configurable, max 25 MB by default). - Disallow allocation of a buffer which would go past the data file's length. - Server-side logs now print out the file name and key (in hex) which triggered the problem. - Server-side logs now print out the socket name and stacktrace when SelectorManagerWorker catches a Throwable. - Client-side will report an "internal server error" when any of the bad allocation scenarios described above happen. - Slight optimization in the allocation strategy while reading the key/values in a data file.
1 parent d4e27d9
Tip revision: f7303dfa61d8c5fbbaeee29a56ed3ec2d64b8e6e authored by Felix GV on 16 October 2015, 22:47:38 UTC
Protection against data corruption.
Protection against data corruption.
Tip revision: f7303df
File | Mode | Size |
---|---|---|
.settings | ||
bin | ||
clients | ||
config | ||
contrib | ||
docs | ||
example | ||
gradle | ||
private-lib | ||
src | ||
test | ||
voldemort-contrib | ||
.gitignore | -rw-r--r-- | 242 bytes |
CONTRIBUTORS | -rw-r--r-- | 659 bytes |
LICENSE | -rw-r--r-- | 11.1 KB |
NOTES | -rw-r--r-- | 2.5 KB |
NOTICE | -rw-r--r-- | 8.1 KB |
README.md | -rw-r--r-- | 4.4 KB |
build.gradle | -rw-r--r-- | 20.0 KB |
build.xml | -rw-r--r-- | 1.7 KB |
gradle.properties | -rw-r--r-- | 1.1 KB |
gradlew | -rwxr-xr-x | 5.0 KB |
gradlew.bat | -rw-r--r-- | 2.3 KB |
release_notes.txt | -rw-r--r-- | 45.3 KB |
settings.gradle | -rw-r--r-- | 149 bytes |
tomcat-tasks.properties | -rw-r--r-- | 420 bytes |
web.xml | -rw-r--r-- | 1.1 KB |
Computing file changes ...