Range iterator starts with keys found in ram (for the unsorted blobs).
[eblob.git] / eblob-bf.spec
blob7a844cf516a6577f5ac3285ba2466809d99e5663
1 Summary: low-level IO library which stores data in huge blob files appending records one after another
2 Name: eblob
3 Version: 0.17.2
4 Release: 1%{?dist}.1
6 License: GPLv2+
7 Group: System Environment/Libraries
8 URL: http://www.ioremap.net/projects/eblob
9 Source0: %{name}-%{version}.tar.bz2
10 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
12 %if %{defined rhel} && 0%{?rhel} < 6
13 %define boost_ver 141
14 %else
15 %define boost_ver %{nil}
16 %endif
17 BuildRequires: boost%{boost_ver}-devel, boost%{boost_ver}-filesystem, boost%{boost_ver}-iostreams, boost%{boost_ver}-python, boost%{boost_ver}-regex, boost%{boost_ver}-system, boost%{boost_ver}-thread
18 BuildRequires: cmake >= 2.6
19 BuildRequires: python-devel
20 BuildRequires: snappy-devel
22 %description
23 libeblob is a low-level IO library which stores data in huge blob files
24 appending records one after another.
26 * fast append-only updates which do not require disk seeks
27 * compact index to populate lookup information from disk
28 * multi-threaded index reading during starup
29 * O(1) data location lookup time
30 * ability to lock in-memory lookup index (hash table) to eliminate
31 memory swap
32 * readahead games with data and index blobs for maximum performance
33 * multiple blob files support (tested with blob-file-as-block-device too)
34 * optional sha256 on-disk checksumming
35 * 2-stage write: prepare (which reserves the space) and commit
36 (which calculates checksum and update in-memory and on-disk indexes).
37 One can (re)write data using pwrite() in between without locks
38 * usuall 1-stage write interface
39 * flexible configuration of hash table size, flags, alignment
40 * defragmentation tool: entries to be deleted are only marked as removed,
41 eblob_check will iterate over specified blob files and actually
42 remove those blocks
43 * off-line blob consistency checker: eblob_check can verify checksums
44 for all records which have them
45 * run-time sync support - dedicated thread runs fsync on all files
46 on timed base
47 * in-memory index lives in memory mapped file
49 %package devel
50 Summary: Development files for %{name}
51 Group: Development/Libraries
52 Requires: %{name} = %{version}-%{release}
55 %description devel
56 libeblob is a low-level IO library which stores data in huge blob files
57 appending records one after another.
59 This package contains libraries, header files and developer documentation
60 needed for developing software which uses the eblob library.
62 %prep
63 %setup -q
65 %build
66 export LDFLAGS="-Wl,-z,defs"
67 export DESTDIR="%{buildroot}"
68 %if %{defined rhel} && 0%{?rhel} < 6
69 CXXFLAGS="-pthread -I/usr/include/boost141" LDFLAGS="-L/usr/lib64/boost141" %{cmake} -DBoost_LIB_DIR=/usr/lib64/boost141 -DBoost_INCLUDE_DIR=/usr/include/boost141 -DBoost_LIBRARYDIR=/usr/lib64/boost141 -DBOOST_LIBRARYDIR=/usr/lib64/boost141 .
70 %else
71 %{cmake} .
72 %endif
73 %if 0%{?rhel} <= 5
74 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
75 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
76 %endif
77 make %{?_smp_mflags}
79 %install
80 rm -rf %{buildroot}
81 make install DESTDIR="%{buildroot}"
82 rm -f %{buildroot}%{_libdir}/*.a
83 rm -f %{buildroot}%{_libdir}/*.la
85 %post -p /sbin/ldconfig
86 %postun -p /sbin/ldconfig
88 %clean
89 rm -rf %{buildroot}
91 %files
92 %defattr(-,root,root,-)
93 %doc AUTHORS README
94 %{_bindir}/*
95 %{_libdir}/lib*.so.*
96 %{python_sitelib}/eblob*
99 %files devel
100 %defattr(-,root,root,-)
101 %{_includedir}/*
102 %{_libdir}/lib*.so
104 %changelog
105 * Thu Sep 06 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.17.2
106 - fxd depends generation
107 - Use small-lettered cmake functions
108 - Added python support
109 - Added rpath into binaries
110 - Spec update
111 - Move snappy into global build dep
112 - When linking eblob_regex_iter do not use all boost libs, but only needed
114 * Mon Aug 20 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.17.1
115 - Fixed 1000-records defragmentation limit
116 - Use bulk read in iterator
118 * Sun Aug 19 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.17.0
119 - Moved to log levels from log masks
121 * Sat Aug 18 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.16.11
122 - Turn off timed defrag
123 - Get rid of stdint, it exists everywhere
124 - Moved to cmake from autoconf. Courtesy to Vsevolod Velichko <torkvema@gmail.com>
126 * Wed Aug 08 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.16.10
127 - Added possibility to start defragmentation on demand
129 * Fri Aug 03 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.16.9
130 - Only allow names which are in form of '-.' without suffixes
131 - Do not return header data in python eblob iterator
132 - Misc cleanup
133 - Do not compile example/iterate_send.cpp
134 - Speedup eblob start using bulk index read
136 * Thu Jul 05 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.16.8
137 - Check if file is really opened in iterator.cpp
139 * Mon Jul 02 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.16.7
140 - Fix removed flags in indexes
142 * Mon Jun 25 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.16.6
143 - Use boost::iostreams::file_source instead of
144 boost::iostreams::mapped_file, since the latter leaks
145 - Added iterator program which sends data to elliptics
147 * Mon Jun 25 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.16.5
148 - Dep builds update
150 * Mon Jun 18 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.16.4
151 - Use libsnappy1 or snappy (debian-only build)
153 * Mon Jun 18 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.16.3
154 - Use libsnappy1 instead of snappy (debian-only build)
156 * Mon Jun 18 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.16.2
157 - Added flag which prevents free-space check during write
159 * Sat Jun 9 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.16.1
160 - Enable defragmentation
162 * Thu Jun 7 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.16.0
163 - Use ioremap::eblob namespace
165 * Thu May 17 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.15.10
166 - Fixed Precise build
168 * Sat Apr 28 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.15.9
169 - Write 'removed' record in ->prepare(), so it can not be read in parallel. commit() will set correct bit. eblob_write() will do it too.
171 * Fri Apr 27 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.15.8
172 - Use correct F_SETFD/FD_CLOEXEC
174 * Fri Apr 27 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.15.7
175 - added O_CLOEXEC flags
176 - Do not return -ENOSPACE when EBLOB_RESERVE_10_PERCENTS is set and size is less than blob-size, but more than 0.1 of total size
178 * Wed Apr 18 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.15.6
179 - disable defrag for now
181 * Tue Apr 17 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.15.5
182 - Index and data files should be 644 by default to allow others like nginx to read data
183 - Build deps update
185 * Fri Apr 6 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.15.4
186 - Do not sync in separate thread if sync interfal is zero - we will sync on every write anyway
187 - Added no-footer blob flag
188 - Added overwrite-commits flags
189 - Removed posix_fallocate() call
190 - Added hole detection
191 - eblob_py_iterator cleanup
192 - Drop macroses which are not accessible in centos
193 - Do not include blob.h into namespace
195 * Fri Mar 23 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.15.3
196 - Only reserve 10% of free space when EBLOB_RESERVE_10_PERCENTS blob-config-flag is set
197 - Added prepare/commit methods to cpp bindings
198 - Unify blob names - rename existing if found
199 - Generate bloom filter in case of generation sorted index during startup
200 - Use sleep_time-- instead of --sleep_time to honor 1 second timeouts
201 - Sync iteration must be protected by b->lock
203 * Mon Mar 19 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.15.2
204 - Fixed read-modify-write column update
205 - Fixed missed column during type remove
206 - Use correct python path
207 - Added eblob::truncate()
208 - Protect bctl->sort update - fixed defragmentation race
209 - If user does not provide config->log then use stdout logger in cpp binding
210 - Added eblob.py setup.py extra dist files
212 * Sun Mar 11 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.15.1
213 - Fixed leaks
214 - Rename defragmented blobs just after they are created
215 - Include cleanups
216 - Do not use openat()
218 * Wed Feb 29 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.15.0
219 - Added 'automatic' test/check tool
220 - New automatic defragmentation implementation
221 - Added ::key() method
222 - Drop iolocks
224 * Sun Feb 19 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.14.4
225 - Added raw python blob class
226 - eblob_remove_all(): when RAM lookup fails check disk
227 - Deleted eblob_gen_index.cpp
229 * Thu Feb 16 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.14.3
230 - Added python eblob constructor that accepts eblob_config structure on input
232 * Wed Feb 8 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.14.2
233 - Use allocate/read for checksum calculation when reading small objects
234 - Skip .tmp files when scanning base names
236 * Wed Feb 1 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.14.1
237 - Added start/num parameters to iterate over selected number of blobs
239 * Mon Jan 30 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.13.13
240 - Use ssize_t instead of int in eblob_copy_data()
242 * Sun Jan 29 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.13.12
243 - Use chunked splice/copy, since we may have really big objects written
245 * Sun Jan 29 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.13.11
246 - Allow to rollback preallocation if prepare fails
248 * Sun Jan 29 2012 Evgeniy Polyakov <zbr@ioremap.net> - 0.13.10
249 - Merge helpers and fixes
251 * Tue Dec 20 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.13.9
252 - If we are doing prepare, and there is some old data - reserve 2 times as much as requested
254 * Tue Dec 20 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.13.8
255 - Added free space check before trying to reserve space on disk
256 - Truncate stat file precisely to the number of bytes written
257 - Fixed cached keys removal
259 * Mon Dec 19 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.13.7
260 - Added actual index size checks.
261 - Update index early in eblob_write_prepare_disk().
262 - eblob_write() does not need full eblob_write_commit_nolock(), only low-level on-disk part.
264 * Sun Dec 18 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.13.6
265 - Fixed cache entry stall list head processing
267 * Sun Dec 18 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.13.5
268 - Fixed cache entry removal
270 * Sat Dec 17 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.13.4
271 - If commit provides size, use it as object size. If prepare reuses existing region, do not change its sizes.
272 - Changed eblob_write_prepare() first to try to check existing region if it is big enough.
274 * Sat Dec 17 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.13.3
275 - Initialize allocated memory for ecache to 0
277 * Sat Dec 17 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.13.2
278 - Optimize prepare (for eblob_write_prepare() only) call to reuse existing prepared area if its size is big enough
280 * Thu Dec 15 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.13.1
281 - Fixed cache balancing
283 * Thu Dec 15 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.13.0
284 - Added configurable two-queue cache for read data by Anton Kortunov <toshic.toshic@gmail.com>
286 * Fri Dec 2 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.12.23
287 - Added eblob_read_nocsum() - read data without csum check
289 * Sat Nov 26 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.12.22
290 - Added eblob_csum_ok()
292 * Thu Nov 24 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.12.21
293 - Skip malformed zero entries during iteration
294 - eblob_fill_write_control_from_ram() should not check whether aligned size is enough when doing read command
296 * Wed Nov 23 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.12.20
297 - Initialize eblob_write_control to zeroes in eblob_plain_write()
299 * Sat Nov 19 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.12.19
300 - Multiple prepare/commit fixes for POHMELFS. Better write debug.
302 * Mon Nov 14 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.12.18
303 - Added array of IO locks to protect state update during IO
304 - Simplified eblob_write()
305 - Dropped openssl bits
307 * Mon Oct 31 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.12.17
308 - Fill in-memory rbtree and bloom filter for online generated sorted index
309 - Do not update in-memory structures before pwrite
310 - Added eblob_get_types function
312 * Tue Oct 25 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.12.16
313 - Don't compare flags in bsearch callback
315 * Mon Oct 24 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.12.15
316 - Do not open index and data files again in eblob_iterate
317 - Update unsorted indexes of removed records with BLOB_DISK_CTL_REMOVE flag
318 - Use 50 millions of records in blob by default
319 - Added eblob_merge (instead of old eblob_defrag) which defragments and
320 merges (multiple) blobs into larger one
322 * Wed Oct 19 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.12.14
323 - Added bsearch statistics and on-disk lookup debugs
324 - Use 40 indexes per range block. Use 128 bits per index for bloom.
326 * Tue Oct 18 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.12.13
327 - Fixed sorted index bsearch range calculation
329 * Sat Oct 15 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.12.12
330 - Added bloom filter in sorted index blocks
331 - Added tree for range index search
333 * Wed Oct 12 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.12.11
334 - Only read mapped data blob if EBLOB_ITERATE_FLAGS_ALL flag is set
336 * Tue Oct 11 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.12.10
337 - Returned offline defrag tool
338 - Drop libssl deps
339 - Check if record is removed in blob
341 * Wed Jun 29 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.6.0
342 - Added snappy compression support
343 - Added start/max types into iterator. Exoport nice interface outside. (0.5.2)
345 * Sat Jun 25 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.5.1
346 - Create new files, if eblob dir is empty
348 * Sat Jun 25 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.5.0
349 - Added multiple columns support
351 * Tue Jun 22 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.4.4
352 - Added eblob_remove_hashed() and eblob::remove_hashed()
354 * Tue Jun 21 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.4.3
355 - Return real data offset, do not force clients to mess with sizeof(struct
356 eblob_disk_control)
357 - Added hashed keys
358 - Renames write methods
359 - Switched to fixed-size eblob_key interface
360 - Added namespace zbr
361 - Added eblob range query
362 - Added remove() method
363 - Added c++ examples
365 * Tue Jun 7 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.3.13
366 - Overwrite hash entry if we asked to replace it and sizes match
367 - Use (part of) provided key as hash table index
368 - Preallocate more space for hash entries in a bucket
369 - Save references to open data/index failes in iterator
370 - Initial implementation of startup defragmentation
371 - Extended eblob_iterator class to support index and data iterators
373 * Fri Jun 3 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.3.12
374 - Use the same mmap file for subsequent starts by default
375 - Grow and start map file by 1 Gb
377 * Thu Jun 2 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.3.11
378 - Do not move entries around, since we are closing down whole mapping anyway
379 - Use posix_fallocate() to preallocate sufficiently large mmap files
380 - Added completion callback and matched callback counters into iterator
381 - Allocate/free mmap_file and use eblob file by default as a base path for mmap file
382 - truncate map file to 0 at cleanup
384 * Wed Jun 1 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.3.10
385 - Remap new portions of backend allocation file at different locations.
387 * Wed Jun 1 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.3.7
388 - Use mremap(MREMAP_FIXED | MREMAP_MAYMOVE)
390 * Wed Jun 1 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.3.5
391 - Fixed ostringstream and its std::string dereference
393 * Wed Jun 1 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.3.4
394 - Added read() methods
395 - Use ostringstream for mmap file name
397 * Wed Jun 1 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.3.3
398 - Added cpp binding
400 * Tue May 31 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.3.2
401 - Moved in-memory index into memory mapped file
402 - Fair number of other changes
404 * Tue Mar 1 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.1.7-1
405 - Log level cleanups
407 * Mon Feb 28 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.1.6-1
408 - Correctly set index's disk_size to sizeof(struct eblob_disk_control)
410 * Mon Feb 28 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.1.5-1
411 - Added index generating defragmenter.
413 * Tue Feb 8 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.1.2-1
414 - Do not lock entries in eblob_hash_insert_raw() since they should be locked via mlockall().
416 * Tue Feb 8 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.1.2-1
417 - Set memory locking limits to infinity if EBLOB_HASH_MLOCK is set in config.
419 * Tue Feb 8 2011 Evgeniy Polyakov <zbr@ioremap.net> - 0.1.1-1
420 - Use mlockall(MCL_CURRENT | MCL_FUTURE) to lock all current and future
421 allocations when EBLOB_HASH_MLOCK is set.
423 * Mon Nov 29 2010 Evgeniy Polyakov <zbr@ioremap.net> - 0.1.0-1
424 - Switched to sha512 and 64-byte IDs
426 * Sun Jul 28 2010 Evgeniy Polyakov <zbr@ioremap.net> - 0.0.1-1
427 - Initial build for Fedora.