]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/log
rocksdb.git
9 months agobuild: Include <cstdint> more places wip-gcc15-cstdint-include
Adam C. Emerson [Thu, 8 May 2025 17:47:03 +0000 (13:47 -0400)]
build: Include <cstdint> more places

Fix needed as of GCC 15.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2 years agoMerge pull request #44 from tserong/wip-gcc-13 ceph-reef-v7.9.2
Radoslaw Zarzynski [Wed, 24 May 2023 19:55:23 +0000 (21:55 +0200)]
Merge pull request #44 from tserong/wip-gcc-13

Fix FTBFS on gcc 13

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Mark Nelson <mnelson@redhat.com>
2 years agocheckpoint.h: Add missing includes <cstdint> 44/head
Khem Raj [Wed, 25 Jan 2023 05:40:43 +0000 (21:40 -0800)]
checkpoint.h: Add missing includes <cstdint>

It uses uint64_t and it comes from <cstdint>
This is needed with GCC 13 and newer [1]

[1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 31012cdfa435d9203da3c3de8127b66bf018692a)

2 years agoFix build with gcc 13 by including <cstdint> (#11118)
Heiko Becker [Wed, 25 Jan 2023 22:30:32 +0000 (14:30 -0800)]
Fix build with gcc 13 by including <cstdint> (#11118)

Summary:
Like other versions before, gcc 13 moved some includes around and as a result <cstdint> is no longer transitively included [1]. Explicitly include it for uint{32,64}_t.

[1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes

Pull Request resolved: https://github.com/facebook/rocksdb/pull/11118

Reviewed By: cbi42

Differential Revision: D42711356

Pulled By: ajkr

fbshipit-source-id: 5ea257b85b7017f40fd8fdbce965336da95c55b2
(cherry picked from commit 88edfbfb5e1cac228f7cc31fbec24bb637fe54b1)

3 years agodb: VersionEdit can understand the format introduced in PR 3488.
Radoslaw Zarzynski [Tue, 21 Aug 2018 19:47:48 +0000 (21:47 +0200)]
db: VersionEdit can understand the format introduced in PR 3488.

RocksDB's PR 3488 introduced a new format of `VersionEdit`
encoding which is not understandable for older versions.
Thus, the change broke forward compatibility and has been
reverted in PR 3762. Later, PR 3765 reiterated the concept
but in a way that does not provide compatibility with the very
short-living format of PR 3488.

This change tries to address the issue of accessing DBs
in format of 3488 by ignoring the special entries.

Fixes: http://tracker.ceph.com/issues/25146
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
(cherry picked from commit ffed5e68515620e1de0b66d96d2ec15cef1c82a7)
(cherry picked from commit c540de6f709b66efd41436694f72d6f7986a325b)

3 years agoAdd a unit test for PR 11049
anand76 [Thu, 22 Dec 2022 17:30:39 +0000 (09:30 -0800)]
Add a unit test for PR 11049

3 years agoBump version to 7.9.2
anand76 [Wed, 21 Dec 2022 17:51:53 +0000 (09:51 -0800)]
Bump version to 7.9.2

3 years agoFix async prefetch heap use after free (#11049)
anand76 [Wed, 21 Dec 2022 17:15:53 +0000 (09:15 -0800)]
Fix async prefetch heap use after free (#11049)

Summary:
This PR fixes a heap use after free bug in the async prefetch code that happens in the following scenario -
1. Scan thread starts 2 async reads for Seek, one for the seek block and one for prefetching
2. Before the first read in https://github.com/facebook/rocksdb/issues/1 completes, another thread reads and loads the block in cache
3. The first scan thread finds the block in cache, continues and the next block cache miss is for a block that spans the boundary of the 2 prefetch buffers, and the 1st read is complete but the 2nd one is not complete yet
4. The scan thread will reallocate (i.e free the old buffer and allocate a new one) the 2nd prefetch buffer, and the in-progress prefetch is orphaned
5. The orphaned prefetch finally completes, resulting in a use after free

Also add a few asserts to surface bugs earlier in the crash tests.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/11049

Test Plan: Repro with db_stress and verify the fix

Reviewed By: akankshamahajan15

Differential Revision: D42181118

Pulled By: anand1976

fbshipit-source-id: 1ac55d2f64a89ce128c1c574262b8aa7d82eb8cc

3 years agoUpdate version.h to 7.9.1
anand76 [Fri, 9 Dec 2022 03:54:29 +0000 (19:54 -0800)]
Update version.h to 7.9.1

3 years agoUpdate HISTORY.md for 7.9.1
anand76 [Fri, 9 Dec 2022 03:25:26 +0000 (19:25 -0800)]
Update HISTORY.md for 7.9.1

3 years agoFix table cache leak in MultiGet with async_io (#10997)
anand76 [Mon, 5 Dec 2022 06:58:25 +0000 (22:58 -0800)]
Fix table cache leak in MultiGet with async_io (#10997)

Summary:
When MultiGet with the async_io option encounters an IO error in TableCache::GetTableReader, it may result in leakage of table cache handles due to queued coroutines being abandoned. This PR fixes it by ensuring any queued coroutines are run before aborting the MultiGet.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10997

Test Plan:
1. New unit test in db_basic_test
2. asan_crash

Reviewed By: pdillinger

Differential Revision: D41587244

Pulled By: anand1976

fbshipit-source-id: 900920cd3fba47cb0fc744a62facc5ffe2eccb64

3 years agoRevert "Improve / refactor anonymous mmap capabilities (#10810)"
Peter Dillinger [Mon, 28 Nov 2022 17:34:16 +0000 (09:34 -0800)]
Revert "Improve / refactor anonymous mmap capabilities (#10810)"

This reverts commit 8367f0d2d76de0f7d096cc65f5f9ebfb907d551a.

3 years agoRevert "Fix include of windows.h in mmap.h (#10885)"
Peter Dillinger [Mon, 28 Nov 2022 17:33:56 +0000 (09:33 -0800)]
Revert "Fix include of windows.h in mmap.h (#10885)"

This reverts commit 49b7f219de87e4429067666cd92f826fe202f2f1.