Skip to content

Commit fc20487

Browse files
authored
fix(doc): use an automatic url link, fix doc links, remove deprecated names in doc (#1493)
1 parent 82ccb48 commit fc20487

File tree

6 files changed

+11
-13
lines changed

6 files changed

+11
-13
lines changed

rust/common/src/hash/dispatcher.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
use super::{HashKey, MAX_FIXED_SIZE_KEY_ELEMENTS};
15+
use super::HashKey;
1616
use crate::hash;
1717
use crate::types::{DataSize, DataType};
1818

@@ -60,15 +60,16 @@ pub trait HashKeyDispatcher {
6060
}
6161
}
6262

63+
pub const MAX_FIXED_SIZE_KEY_ELEMENTS: usize = 8;
6364
/// Calculate what kind of hash key should be used given the key data types.
6465
///
65-
/// When any of following conditions is met, we choose [`SerializedKey`]:
66+
/// When any of following conditions is met, we choose [`crate::hash::SerializedKey`]:
6667
/// 1. Has variable size column.
6768
/// 2. Number of columns exceeds [`MAX_FIXED_SIZE_KEY_ELEMENTS`]
6869
/// 3. Sizes of data types exceed `256` bytes.
6970
/// 4. Any column's serialized format can't be used for equality check.
7071
///
71-
/// Otherwise we choose smallest [`FixedSizeKey`] whose size can hold all data types.
72+
/// Otherwise we choose smallest [`crate::hash::FixedSizeKey`] whose size can hold all data types.
7273
pub fn calc_hash_key_kind(data_types: &[DataType]) -> HashKeyKind {
7374
if data_types.len() > MAX_FIXED_SIZE_KEY_ELEMENTS {
7475
return HashKeyKind::KeySerialized;

rust/common/src/hash/key.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ use crate::util::hash_util::CRC32FastBuilder;
4040
/// are encoded from both `t.b, t.c`. If t.b="abc", t.c=1, the hashkey may be
4141
/// encoded in certain format of ("abc", 1).
4242
43-
/// Max element count in [`FixedSizeKeyWithHashCode`]
44-
pub const MAX_FIXED_SIZE_KEY_ELEMENTS: usize = 8;
45-
4643
pub trait HashKeySerializer {
4744
type K: HashKey;
4845
fn from_hash_code(hash_code: u64) -> Self;
@@ -119,7 +116,7 @@ pub trait HashKey: Clone + Debug + Hash + Eq + Sized + Send + Sync + 'static {
119116

120117
/// Designed for hash keys with at most `N` serialized bytes.
121118
///
122-
/// See [`crate::executor::hash_map::calc_hash_key_kind`]
119+
/// See [`crate::hash::calc_hash_key_kind`]
123120
#[derive(Clone, Debug)]
124121
pub struct FixedSizeKey<const N: usize> {
125122
hash_code: u64,
@@ -129,7 +126,7 @@ pub struct FixedSizeKey<const N: usize> {
129126

130127
/// Designed for hash keys which can't be represented by [`FixedSizeKey`].
131128
///
132-
/// See [`crate::executor::hash_map::calc_hash_key_kind`]
129+
/// See [`crate::hash::calc_hash_key_kind`]
133130
#[derive(Clone, Debug)]
134131
pub struct SerializedKey {
135132
key: Vec<Datum>,

rust/storage/src/hummock/iterator/reverse_user.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub struct ReverseUserIterator<'a> {
5353
}
5454

5555
impl<'a> ReverseUserIterator<'a> {
56-
/// Creates [`UserIterator`] with maximum epoch.
56+
/// Creates [`ReverseUserIterator`] with maximum epoch.
5757
#[cfg(test)]
5858
pub(crate) fn new(
5959
iterator: ReverseMergeIterator<'a>,
@@ -62,7 +62,7 @@ impl<'a> ReverseUserIterator<'a> {
6262
Self::new_with_epoch(iterator, key_range, Epoch::MAX, None)
6363
}
6464

65-
/// Creates [`UserIterator`] with given `read_epoch`.
65+
/// Creates [`ReverseUserIterator`] with given `read_epoch`.
6666
pub(crate) fn new_with_epoch(
6767
iterator: ReverseMergeIterator<'a>,
6868
key_range: (Bound<Vec<u8>>, Bound<Vec<u8>>),

rust/storage/src/hummock/sstable/block.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ impl Default for BlockBuilderOptions {
189189
}
190190
}
191191

192-
/// [`BlockV2Writer`] encode and append block to a buffer.
192+
/// [`BlockBuilder`] encodes and appends block to a buffer.
193193
pub struct BlockBuilder {
194194
/// Write buffer.
195195
buf: BytesMut,

rust/storage/src/hummock/sstable/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const MAGIC: u32 = 0x5785ab73;
4141
const VERSION: u32 = 1;
4242

4343
#[derive(Clone)]
44-
/// [`SSTable`] is a handle for accessing SST in [`TableManager`].
44+
/// [`Sstable`] is a handle for accessing SST.
4545
pub struct Sstable {
4646
pub id: u64,
4747
pub meta: SstableMeta,

rust/storage/src/object/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ pub trait ObjectStore: Send + Sync {
5353
/// If the `block_loc` is None, the whole object will be return.
5454
/// If objects are PUT using a multipart upload, it’s a good practice to GET them in the same
5555
/// part sizes (or at least aligned to part boundaries) for best performance.
56-
/// https://d1.awsstatic.com/whitepapers/AmazonS3BestPractices.pdf?stod_obj2
56+
/// <https://d1.awsstatic.com/whitepapers/AmazonS3BestPractices.pdf?stod_obj2>
5757
async fn read(&self, path: &str, block_loc: Option<BlockLocation>) -> Result<Bytes>;
5858

5959
async fn readv(&self, path: &str, block_locs: Vec<BlockLocation>) -> Result<Vec<Bytes>>;

0 commit comments

Comments
 (0)