Skip to content

Commit

Permalink
20548 MISSING CONDITION FOR RETURNING LOG DATA
Browse files Browse the repository at this point in the history
As per bug 20548, if DB logging is enabled for jobservice and the parameter is also set for maximum log size
the log data is not being returned and 'Clean Up->Show GC Logs' shows a blank page

Signed-off-by: Mohamed Awnallah <mohamedmohey2352@gmail.com>
Co-authored-by: Nick Hindley <no-reply@example.com>
  • Loading branch information
mohamedawnallah and Nick Hindley committed Jul 2, 2024
1 parent 5490d8d commit 42931f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jobservice/logger/getter/db_getter.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (dbg *DBGetter) Retrieve(logID string) ([]byte, error) {
sz := int64(len(jobLog.Content))
var buf []byte
sizeLimit := logSizeLimit()
if sizeLimit <= 0 {
if sizeLimit <= 0 || sz <= sizeLimit {
buf = []byte(jobLog.Content)
return buf, nil
}
Expand Down

0 comments on commit 42931f4

Please # to comment.