apache / apache/rocketmq-client-cpp

[Bug] Single log file size limit failed

Đang mở
#499 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C++
Star
393
Fork
167
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**BUG REPORT**

1. Please describe the issue you observed:

- What did you do (The steps to reproduce)?
Taking mqAdmin as an example, when I call **SetMQAdminLogFileNumAndSize** to trigger the **setLogFileSizeAndNum** of **DefaultMQClient**, I find that the log is not sharded.

![Image](https://github.com/user-attachments/assets/3f1a1c66-fed5-4d51-915f-5d9bc83e55c5)

- What did you expect to see?

As expected, there should be 4 logs per 3M

- What did you see instead?

![Image](https://github.com/user-attachments/assets/8d07eb06-5a75-4f00-9cfc-8ca8978db8ea)
The size of a single file exceeds 3M

2. Please tell us about your environment:

- What is your OS?

macos/arm

- What is your client version?
latest

- What is your RocketMQ version?
latest

3. Other information (e.g. detailed explanation, logs, related issues, suggestions on how to fix, etc):

fix: use set_rotation_size function provided by boost
![Image](https://github.com/user-attachments/assets/83e9d5ef-2e26-41a7-8560-c4ec0ca3c9ab)

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start by tracing SetMQAdminLogFileNumAndSize into DefaultMQClient and setLogFileSizeAndNum, then inspect how the log rotation size is applied. The report points to Boost's set_rotation_size function as the proposed direction. Done means the configured limit is respected and the expected four logs of about 3M each are produced on macOS/ARM.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
cpp
Lĩnh vực
backend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.