Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[ISSUE #2037]Adding #[inline] for BatchConsumeQueue methods. #2039

Merged
merged 1 commit into from
Jan 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions rocketmq-store/src/queue/batch_consume_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ pub struct BatchConsumeQueue {
}

impl BatchConsumeQueue {
#[inline]
pub fn new(
topic: CheetahString,
queue_id: i32,
Expand Down Expand Up @@ -132,6 +133,7 @@ impl BatchConsumeQueue {

#[allow(unused_variables)]
impl FileQueueLifeCycle for BatchConsumeQueue {
#[inline]
fn load(&mut self) -> bool {
let result = self.mapped_file_queue.load();
info!(
Expand All @@ -144,44 +146,54 @@ impl FileQueueLifeCycle for BatchConsumeQueue {
result
}

#[inline]
fn recover(&mut self) {
todo!()
}

#[inline]
fn check_self(&self) {
todo!()
}

#[inline]
fn flush(&self, flush_least_pages: i32) -> bool {
todo!()
}

#[inline]
fn destroy(&mut self) {
todo!()
}

#[inline]
fn truncate_dirty_logic_files(&mut self, max_commit_log_pos: i64) {
todo!()
}

#[inline]
fn delete_expired_file(&self, min_commit_log_pos: i64) -> i32 {
todo!()
}

#[inline]
fn roll_next_file(&self, next_begin_offset: i64) -> i64 {
todo!()
}

#[inline]
fn is_first_file_available(&self) -> bool {
todo!()
}

#[inline]
fn is_first_file_exist(&self) -> bool {
todo!()
}
}

impl Swappable for BatchConsumeQueue {
#[inline]
fn swap_map(
&self,
reserve_num: i32,
Expand All @@ -191,60 +203,74 @@ impl Swappable for BatchConsumeQueue {
todo!()
}

#[inline]
fn clean_swapped_map(&self, force_clean_swap_interval_ms: i64) {
todo!()
}
}

impl ConsumeQueueTrait for BatchConsumeQueue {
#[inline]
fn get_topic(&self) -> &CheetahString {
todo!()
}

#[inline]
fn get_queue_id(&self) -> i32 {
todo!()
}

#[inline]
fn get(&self, index: i64) -> Option<CqUnit> {
todo!()
}

#[inline]
fn get_cq_unit_and_store_time(&self, index: i64) -> Option<(CqUnit, i64)> {
todo!()
}

#[inline]
fn get_earliest_unit_and_store_time(&self) -> Option<(CqUnit, i64)> {
todo!()
}

#[inline]
fn get_earliest_unit(&self) -> CqUnit {
todo!()
}

#[inline]
fn get_latest_unit(&self) -> CqUnit {
todo!()
}

#[inline]
fn get_last_offset(&self) -> i64 {
todo!()
}

#[inline]
fn get_min_offset_in_queue(&self) -> i64 {
todo!()
}

#[inline]
fn get_max_offset_in_queue(&self) -> i64 {
todo!()
}

#[inline]
fn get_message_total_in_queue(&self) -> i64 {
todo!()
}

#[inline]
fn get_offset_in_queue_by_time(&self, timestamp: i64) -> i64 {
todo!()
}

#[inline]
fn get_offset_in_queue_by_time_boundary(
&self,
timestamp: i64,
Expand All @@ -253,34 +279,42 @@ impl ConsumeQueueTrait for BatchConsumeQueue {
todo!()
}

#[inline]
fn get_max_physic_offset(&self) -> i64 {
todo!()
}

#[inline]
fn get_min_logic_offset(&self) -> i64 {
todo!()
}

#[inline]
fn get_cq_type(&self) -> CQType {
todo!()
}

#[inline]
fn get_total_size(&self) -> i64 {
todo!()
}

#[inline]
fn get_unit_size(&self) -> i32 {
todo!()
}

#[inline]
fn correct_min_offset(&self, min_commit_log_offset: i64) {
todo!()
}

#[inline]
fn put_message_position_info_wrapper(&mut self, request: &DispatchRequest) {
todo!()
}

#[inline]
fn increase_queue_offset(
&self,
queue_offset_assigner: &QueueOffsetOperator,
Expand All @@ -290,6 +324,7 @@ impl ConsumeQueueTrait for BatchConsumeQueue {
todo!()
}

#[inline]
fn assign_queue_offset(
&self,
queue_offset_operator: &QueueOffsetOperator,
Expand All @@ -298,14 +333,17 @@ impl ConsumeQueueTrait for BatchConsumeQueue {
todo!()
}

#[inline]
fn estimate_message_count(&self, from: i64, to: i64, filter: &dyn MessageFilter) -> i64 {
todo!()
}

#[inline]
fn iterate_from(&self, start_index: i64) -> Option<Box<dyn Iterator<Item = CqUnit>>> {
todo!()
}

#[inline]
fn iterate_from_inner(
&self,
start_index: i64,
Expand Down
Loading