Skip to content

Commit d50c50b

Browse files
committed
Stop pinning commit-group snapshot versions
1 parent 82d2aae commit d50c50b

9 files changed

Lines changed: 30 additions & 38 deletions

File tree

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mvclient/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mvclient"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
edition = "2021"
55
license = "Apache-2.0"
66
authors = ["Heyang Zhou <heyang.zhou@icloud.com>"]

mvfs/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mvfs"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
edition = "2021"
55
license = "Apache-2.0"
66
authors = ["Heyang Zhou <heyang.zhou@icloud.com>"]
@@ -15,7 +15,7 @@ anyhow = "1"
1515
thiserror = "2"
1616
futures = "0.3"
1717
tokio = { version = "1", features = ["full"] }
18-
mvclient = { path = "../mvclient", version = "0.3.4" }
18+
mvclient = { path = "../mvclient", version = "0.3.5" }
1919
tracing = "0.1"
2020
serde = { version = "1", features = ["derive"] }
2121
serde_json = "1"

mvfs/src/commit_group.rs

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ pub struct CommitGroup {
99
intents: Vec<NamespaceCommitIntent>,
1010
client: Option<Arc<MultiVersionClient>>,
1111
dp: Option<Url>,
12-
pub current_version: Option<String>,
1312
}
1413

1514
impl Default for CommitGroup {
@@ -18,14 +17,12 @@ impl Default for CommitGroup {
1817
intents: Vec::new(),
1918
client: None,
2019
dp: None,
21-
current_version: None,
2220
}
2321
}
2422
}
2523

2624
pub enum TransactionStart {
2725
Normal,
28-
UseVersion(String),
2926
Reject,
3027
}
3128

@@ -59,24 +56,12 @@ pub fn transaction_start() -> TransactionStart {
5956
let cg = cg.borrow();
6057
match &*cg {
6158
Some(cg) if !cg.intents.is_empty() => TransactionStart::Reject,
62-
Some(cg) => match &cg.current_version {
63-
Some(version) => TransactionStart::UseVersion(version.clone()),
64-
None => TransactionStart::Normal,
65-
},
59+
Some(_) => TransactionStart::Normal,
6660
None => TransactionStart::Normal,
6761
}
6862
})
6963
}
7064

71-
pub fn set_current_version(version: &str) {
72-
CURRENT_COMMIT_GROUP.with(|cg| {
73-
if let Some(cg) = &mut *cg.borrow_mut() {
74-
cg.current_version
75-
.get_or_insert_with(|| version.to_string());
76-
}
77-
});
78-
}
79-
8065
pub fn append_intent(
8166
client: &Arc<MultiVersionClient>,
8267
dp: Option<&Url>,
@@ -184,4 +169,15 @@ mod tests {
184169
rollback().unwrap();
185170
assert!(!is_active());
186171
}
172+
173+
#[test]
174+
fn transaction_start_stays_normal_until_first_intent() {
175+
begin().unwrap();
176+
assert!(matches!(transaction_start(), TransactionStart::Normal));
177+
178+
append_intent(&test_client(), None, test_intent()).unwrap();
179+
assert!(matches!(transaction_start(), TransactionStart::Reject));
180+
181+
rollback().unwrap();
182+
}
187183
}

mvfs/src/vfs.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -646,9 +646,6 @@ impl Connection {
646646
);
647647
return Ok(false);
648648
}
649-
TransactionStart::UseVersion(version) => Ok(self
650-
.client
651-
.create_transaction_at_version(self.dp.as_ref(), &version, false)),
652649
TransactionStart::Normal => {
653650
let client = self.client.clone();
654651
let res = client
@@ -660,7 +657,6 @@ impl Connection {
660657
match res {
661658
Ok((txn, info)) => {
662659
interval = info.interval;
663-
commit_group::set_current_version(txn.version());
664660
Ok(txn)
665661
}
666662
Err(e) => Err(e),

mvsqlite-fuse/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mvsqlite-fuse"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -11,7 +11,7 @@ thiserror = "2"
1111
tokio = { version = "1", features = ["full"] }
1212
log = "0.4"
1313
rand = "0.9"
14-
mvclient = { path = "../mvclient", version = "0.3.4" }
14+
mvclient = { path = "../mvclient", version = "0.3.5" }
1515
tracing = "0.1"
1616
tracing-subscriber = { version = "0.3.16", features = ["env-filter", "fmt", "tracing-log", "json"] }
1717
libc = "0.2"
@@ -20,7 +20,7 @@ serde = { version = "1", features = ["derive"] }
2020
serde_json = "1"
2121
lazy_static = "1.4.0"
2222
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls"] }
23-
mvfs = { path = "../mvfs", version = "0.3.4" }
23+
mvfs = { path = "../mvfs", version = "0.3.5" }
2424
fuser = "0.14"
2525
structopt = "0.3.26"
2626
indexmap = "2"

mvsqlite/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mvsqlite"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
edition = "2021"
55
license = "Apache-2.0"
66
authors = ["Heyang Zhou <heyang.zhou@icloud.com>"]
@@ -17,7 +17,7 @@ tokio = { version = "1", features = ["full"] }
1717
log = "0.4"
1818
rand = "0.9"
1919
stackful = "0.1.5"
20-
mvclient = { path = "../mvclient", version = "0.3.4" }
20+
mvclient = { path = "../mvclient", version = "0.3.5" }
2121
tracing = "0.1"
2222
ctor = "0.2"
2323
tracing-subscriber = { version = "0.3.16", features = ["env-filter", "fmt", "json"], optional = true }
@@ -27,7 +27,7 @@ serde = { version = "1", features = ["derive"] }
2727
serde_json = "1"
2828
lazy_static = "1.4.0"
2929
reqwest = { version = "0.12", default-features = false, features = ["http2"] }
30-
mvfs = { path = "../mvfs", version = "0.3.4" }
30+
mvfs = { path = "../mvfs", version = "0.3.5" }
3131

3232
[features]
3333
default = ["loadext", "syscall", "rustls-tls", "global-init"]

mvstore-stress/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
22
name = "mvstore-stress"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
77

88
[dependencies]
9-
mvclient = { path = "../mvclient", version = "0.3.4" }
9+
mvclient = { path = "../mvclient", version = "0.3.5" }
1010
anyhow = "1"
1111
thiserror = "2"
1212
tokio = { version = "1", features = ["full"] }

mvstore/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mvstore"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
edition = "2021"
55
license = "Apache-2.0"
66
authors = ["Heyang Zhou <heyang.zhou@icloud.com>"]

0 commit comments

Comments
 (0)