Project

General

Profile

Actions

Bug #22129

closed

Id to start looking for report json should not be zero but highest id causing abysmal performance on postgresql

Added by Vincent MEMBRÉ about 2 years ago. Updated about 2 years ago.

Status:
Released
Priority:
N/A
Category:
Web - Campaigns
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No

Description

Since we don't update the starting value when we don't get any report_json, next run will use the same id to check for new reports, but we should use store the highest id in databse instead


Subtasks 1 (0 open1 closed)

Bug #22144: Highest id only fetch at first run, but batch is runningReleasedFrançois ARMANDActions
Actions #1

Updated by Vincent MEMBRÉ about 2 years ago

  • Status changed from New to In progress
  • Assignee set to Vincent MEMBRÉ
Actions #2

Updated by Vincent MEMBRÉ about 2 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Vincent MEMBRÉ to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/4582
Actions #3

Updated by Vincent MEMBRÉ about 2 years ago

  • Status changed from Pending technical review to Pending release
Actions #4

Updated by François ARMAND about 2 years ago

  • Fix check changed from To do to Error - Blocking

The current implementation makes the counter update once and then it never get updated again:

# rudder is shut down
rudder=> select * from rudderproperties ;
        name         | value
---------------------+-------
 reportHandlerLastId | 22287
 reportLoggerLastId  | 23032
(2 rows)
# rudder starts ...

rudder=> select * from rudderproperties ;
        name         | value
---------------------+-------
 reportLoggerLastId  | 23032
 reportHandlerLastId | 23032
(2 rows)
# a run happened
rudder=> select * from rudderproperties ;
        name         | value
---------------------+-------
 reportHandlerLastId | 23032
 reportLoggerLastId  | 23122
(2 rows)
# an other run happens...
rudder=> select * from rudderproperties ;
        name         | value
---------------------+-------
 reportLoggerLastId  | 23371
 reportHandlerLastId | 23032
(2 rows)

Actions #5

Updated by Vincent MEMBRÉ about 2 years ago

  • Subtask #22144 added
Actions #6

Updated by François ARMAND about 2 years ago

  • Fix check changed from Error - Blocking to Checked
Actions #7

Updated by Vincent MEMBRÉ about 2 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 7.2.2 which was released today.

Actions #8

Updated by François ARMAND about 2 years ago

  • Subject changed from Id to start looking for report json should not be zero but highest id. to Id to start looking for report json should not be zero but highest id causing abysmal performance on postgres
Actions #9

Updated by François ARMAND about 2 years ago

  • Subject changed from Id to start looking for report json should not be zero but highest id causing abysmal performance on postgres to Id to start looking for report json should not be zero but highest id causing abysmal performance on postgresql
Actions

Also available in: Atom PDF