Skip to content

[bug] glog file not calculate file source length if append log at the start engine  #3593

@songenjie

Description

@songenjie

Describe the bug

  1. glog file not calucate file srouce length if append log at the start engine
  2. because clear https://github.com/apache/incubator-doris/blob/master/thirdparty/patches/glog-0.3.3-for-palo2.patch#L382

To Reproduce

  1. be set
    sys_log_roll_mode = SIZE-MB-200
    sys_log_roll_num = 10
  1. start be and se log
201M -rw-r--r-- 1 root root 201M May 14 17:26 /opt/***/be/log/be.INFO.log.20200514-172042
201M -rw-r--r-- 1 root root 201M May 14 17:33 /opt/***/be/log/be.INFO.log.20200514-172655
201M -rw-r--r-- 1 root root 201M May 14 17:39 /opt/***/be/log/be.INFO.log.20200514-173320
201M -rw-r--r-- 1 root root 201M May 14 17:46 /opt/***/be/log/be.INFO.log.20200514-173944
201M -rw-r--r-- 1 root root 201M May 14 17:52 /opt/***/be/log/be.INFO.log.20200514-174616
201M -rw-r--r-- 1 root root 201M May 14 18:14 /opt/***/be/log/be.INFO.log.20200514-175200
201M -rw-r--r-- 1 root root 201M May 14 19:19 /opt/***/be/log/be.INFO.log.20200514-181405
 44M -rw-r--r-- 1 root root 44M May 14 20:18 /opt/***/be/log/be.INFO.log.20200514-191958
  1. restart be but not clear be log

  1. see be log size
ll -sh /opt/***/be/log/be.*
   0 lrwxrwxrwx 1 root root   27 May 14 21:13 /opt/***/be/log/be.INFO -> be.INFO.log.20200514-211333
201M -rw-r--r-- 1 root root 201M May 14 17:26 /opt/***/be/log/be.INFO.log.20200514-172042
201M -rw-r--r-- 1 root root 201M May 14 17:33 /opt/***/be/log/be.INFO.log.20200514-172655
201M -rw-r--r-- 1 root root 201M May 14 17:39 /opt/***/be/log/be.INFO.log.20200514-173320
201M -rw-r--r-- 1 root root 201M May 14 17:46 /opt/***/be/log/be.INFO.log.20200514-173944
201M -rw-r--r-- 1 root root 201M May 14 17:52 /opt/***/be/log/be.INFO.log.20200514-174616
201M -rw-r--r-- 1 root root 201M May 14 18:14 /opt/***/be/log/be.INFO.log.20200514-175200
201M -rw-r--r-- 1 root root 201M May 14 19:19 /opt/***/be/log/be.INFO.log.20200514-181405
244M -rw-r--r-- 1 root root 244M May 14 20:18 /opt/***/be/log/be.INFO.log.20200514-191958
201M -rw-r--r-- 1 root root 201M May 14 21:13 /opt/***/be/log/be.INFO.log.20200514-201838
155M -rw-r--r-- 1 root root 155M May 14 21:55 /opt/***/be/log/be.INFO.log.20200514-211333
   0 lrwxrwxrwx 1 root root   30 May 13 21:17 /opt/***/be/log/be.WARNING -> be.WARNING.log.20200513-211720
129M -rw-r--r-- 1 root root 129M May 14 21:55 /opt/***/be/log/be.WARNING.log.20200513-211720
4.0K -rw-r--r-- 1 root root  123 May 14 19:25 /opt/***/be/log/be.out

 4 /opt/***/be/log/be.INFO.log.20200514-191958 calculate error

244M -rw-r--r-- 1 root root 244M May 14 20:18 /opt/***/be/log/be.INFO.log.20200514-191958

1.fseek(file_, 0, SEEK_END);

Expected behavior
calculate it at the begging

Metadata

Metadata

Assignees

Labels

approvedIndicates a PR has been approved by one committer.area/dependencyIssues or PRs related to Doris dependencieskind/fixCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions