Skip to content

Commit

Permalink
fix: disable UNLOGGED vector indexes (#443)
Browse files Browse the repository at this point in the history
Signed-off-by: usamoi <[email protected]>
  • Loading branch information
usamoi authored Mar 22, 2024
1 parent 402916d commit 0056d67
Show file tree
Hide file tree
Showing 17 changed files with 334 additions and 446 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ service = { path = "crates/service" }
pgrx = { git = "https://github.com/tensorchord/pgrx.git", branch = "v0.12.0-alpha.1-patch" }

[lints]
rust.unsafe_op_in_unsafe_fn = "deny"
rust.unsafe_op_in_unsafe_fn = "forbid"
rust.unused_lifetimes = "warn"
rust.unused_qualifications = "warn"

Expand Down
4 changes: 0 additions & 4 deletions src/datatype/memory_vecf16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ impl Vecf16Header {
self.dims as usize
}
pub fn slice(&self) -> &[F16] {
debug_assert_eq!(self.varlena & 3, 0);
// TODO: force checking it in the future
// debug_assert_eq!(self.kind, 1);
// debug_assert_eq!(self.reserved, 0);
unsafe { std::slice::from_raw_parts(self.phantom.as_ptr(), self.dims as usize) }
}
pub fn for_borrow(&self) -> Vecf16Borrowed<'_> {
Expand Down
2 changes: 0 additions & 2 deletions src/datatype/memory_veci8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ impl Veci8Header {
}

pub fn data(&self) -> &[I8] {
debug_assert_eq!(self.varlena & 3, 0);
debug_assert_eq!(self.kind, VECI8_KIND);
unsafe { std::slice::from_raw_parts(self.phantom.as_ptr(), self.len as usize) }
}

Expand Down
Loading

0 comments on commit 0056d67

Please sign in to comment.