Skip to content

Commit 90ec0de

Browse files
committed
Merge branch 'main' of github.com:spacejam/sled into tyler_clippy
2 parents aa0a58d + 31d681f commit 90ec0de

File tree

15 files changed

+50
-145
lines changed

15 files changed

+50
-145
lines changed

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
## Breaking Changes
2525

26+
* #1399 Bump MSRV to 1.51.
27+
* #1399 Thread support is now required on all platforms.
2628
* #1135 The "no_metrics" anti-feature has been replaced with
2729
the "metrics" positive feature.
2830
* #1178 the `Event` enum has become a unified struct that allows
@@ -50,19 +52,23 @@
5052
doesn't make sense for things that must fit in memory anyway.
5153
* #1314 `Subscriber::next_timeout` now requires a mutable self
5254
reference.
53-
* #1337 Bump MSRV to 1.48.
5455
* #1349 The "measure_allocs" feature has been removed.
5556
* #1354 `Error` has been modified to be Copy, removing all
5657
heap-allocated variants.
5758

58-
5959
## Bug Fixes
6060

6161
* #1202 Fix a space leak where blobs were not
6262
removed when replaced by another blob.
6363
* #1229 the powerful ALICE crash consistency tool has been
6464
used to discover several crash vulnerabilities, now fixed.
6565

66+
# 0.34.7
67+
68+
## Bug Fixes
69+
70+
* #1314 Fix a bug in Subscriber's Future impl.
71+
6672
# 0.34.6
6773

6874
## Improvements

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sled"
3-
version = "0.34.6"
3+
version = "0.34.7"
44
authors = ["Tyler Neely <[email protected]>"]
55
description = "Lightweight high-performance pure-rust transactional embedded database."
66
license = "MIT/Apache-2.0"
@@ -48,10 +48,10 @@ memshred = []
4848

4949
[dependencies]
5050
libc = "0.2.96"
51-
zstd = { version = "0.9.0", optional = true }
51+
zstd = { version = "0.10.0", optional = true }
5252
crc32fast = "1.2.1"
5353
log = "0.4.14"
54-
parking_lot = "0.11.1"
54+
parking_lot = "0.12.0"
5555
color-backtrace = { version = "0.5.1", optional = true }
5656
num-format = { version = "0.4.0", optional = true }
5757
rio = { version = "0.9.4", optional = true }

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ extreme::run(async move {
161161

162162
# minimum supported Rust version (MSRV)
163163

164-
We support Rust 1.48.0 and up.
164+
We support Rust 1.51.0 and up.
165165

166166
# architecture
167167

scripts/cross_compile.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ rustup update --no-self-update
1212

1313
RUSTFLAGS="--cfg miri" cargo check
1414

15-
rustup toolchain install 1.48.0 --no-self-update
15+
rustup toolchain install 1.51.0 --no-self-update
1616
cargo clean
1717
rm Cargo.lock
18-
cargo +1.48.0 check
18+
cargo +1.51.0 check
1919

2020
for target in $targets; do
2121
echo "setting up $target..."

src/context.rs

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,7 @@ pub struct Context {
1212
/// When the last high-level reference is dropped, it
1313
/// should trigger all background threads to clean
1414
/// up synchronously.
15-
#[cfg(all(
16-
not(miri),
17-
any(
18-
windows,
19-
target_os = "linux",
20-
target_os = "macos",
21-
target_os = "dragonfly",
22-
target_os = "freebsd",
23-
target_os = "openbsd",
24-
target_os = "netbsd",
25-
target_os = "ios",
26-
)
27-
))]
15+
#[cfg(not(miri))]
2816
pub(crate) flusher: Arc<Mutex<Option<flusher::Flusher>>>,
2917
#[doc(hidden)]
3018
pub pagecache: PageCache,
@@ -47,19 +35,7 @@ impl Context {
4735
Ok(Self {
4836
config,
4937
pagecache,
50-
#[cfg(all(
51-
not(miri),
52-
any(
53-
windows,
54-
target_os = "linux",
55-
target_os = "macos",
56-
target_os = "dragonfly",
57-
target_os = "freebsd",
58-
target_os = "openbsd",
59-
target_os = "netbsd",
60-
target_os = "ios",
61-
)
62-
))]
38+
#[cfg(not(miri))]
6339
flusher: Arc::new(parking_lot::Mutex::new(None)),
6440
})
6541
}

src/db.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,7 @@ impl Db {
5353

5454
let context = Context::start(config)?;
5555

56-
#[cfg(all(
57-
not(miri),
58-
any(
59-
windows,
60-
target_os = "linux",
61-
target_os = "macos",
62-
target_os = "dragonfly",
63-
target_os = "freebsd",
64-
target_os = "openbsd",
65-
target_os = "netbsd",
66-
target_os = "ios",
67-
)
68-
))]
56+
#[cfg(not(miri))]
6957
{
7058
let flusher_pagecache = context.pagecache.clone();
7159
let flusher = context.flush_every_ms.map(move |fem| {

src/ivec.rs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -263,23 +263,12 @@ impl std::borrow::Borrow<[u8]> for &IVec {
263263
}
264264
}
265265

266-
macro_rules! from_array {
267-
($($s:expr),*) => {
268-
$(
269-
impl From<&[u8; $s]> for IVec {
270-
fn from(v: &[u8; $s]) -> Self {
271-
Self::from(&v[..])
272-
}
273-
}
274-
)*
266+
impl<const N: usize> From<&[u8; N]> for IVec {
267+
fn from(v: &[u8; N]) -> Self {
268+
Self::from(&v[..])
275269
}
276270
}
277271

278-
from_array!(
279-
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
280-
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32
281-
);
282-
283272
impl Ord for IVec {
284273
fn cmp(&self, other: &Self) -> std::cmp::Ordering {
285274
self.as_ref().cmp(other.as_ref())

src/lib.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -223,19 +223,7 @@ pub mod fail;
223223
#[cfg(feature = "docs")]
224224
pub mod doc;
225225

226-
#[cfg(all(
227-
not(miri),
228-
any(
229-
windows,
230-
target_os = "linux",
231-
target_os = "macos",
232-
target_os = "dragonfly",
233-
target_os = "freebsd",
234-
target_os = "openbsd",
235-
target_os = "netbsd",
236-
target_os = "ios",
237-
)
238-
))]
226+
#[cfg(not(miri))]
239227
mod flusher;
240228

241229
#[cfg(feature = "event_log")]

src/pagecache/iobuf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ impl IoBufs {
873873
let max_header_stable_lsn = self.max_header_stable_lsn.clone();
874874
guard.defer(move || {
875875
trace!("bumping atomic header lsn to {}", stored_max_stable_lsn);
876-
bump_atomic_lsn(&max_header_stable_lsn, stored_max_stable_lsn)
876+
max_header_stable_lsn.fetch_max(stored_max_stable_lsn, SeqCst)
877877
});
878878
guard.flush();
879879
drop(guard);

src/pagecache/logger.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use std::fs::File;
22

33
use super::{
4-
arr_to_lsn, arr_to_u32, assert_usize, bump_atomic_lsn, decompress, header,
5-
iobuf, lsn_to_arr, pread_exact, pread_exact_or_eof, roll_iobuf, u32_to_arr,
6-
Arc, BasedBuf, DiskPtr, HeapId, IoBuf, IoBufs, LogKind, LogOffset, Lsn,
4+
arr_to_lsn, arr_to_u32, assert_usize, decompress, header, iobuf,
5+
lsn_to_arr, pread_exact, pread_exact_or_eof, roll_iobuf, u32_to_arr, Arc,
6+
BasedBuf, DiskPtr, HeapId, IoBuf, IoBufs, LogKind, LogOffset, Lsn,
77
MessageKind, Reservation, Serialize, Snapshot, BATCH_MANIFEST_PID,
88
COUNTER_PID, MAX_MSG_HEADER_LEN, META_PID, SEG_HEADER_LEN,
99
};
@@ -140,7 +140,7 @@ impl Log {
140140
#[cfg(feature = "compression")]
141141
{
142142
if self.config.use_compression && pid != BATCH_MANIFEST_PID {
143-
use zstd::block::compress;
143+
use zstd::bulk::compress;
144144

145145
let buf = item.serialize();
146146

@@ -417,10 +417,9 @@ impl Log {
417417
reservation_lid,
418418
);
419419

420-
bump_atomic_lsn(
421-
&self.iobufs.max_reserved_lsn,
422-
reservation_lsn + inline_buf_len as Lsn - 1,
423-
);
420+
self.iobufs
421+
.max_reserved_lsn
422+
.fetch_max(reservation_lsn + inline_buf_len as Lsn - 1, SeqCst);
424423

425424
let (heap_reservation, heap_id_opt) = if over_heap_threshold {
426425
let heap_reservation = self

0 commit comments

Comments
 (0)