Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ce93a5e

Browse filesBrowse files
fix: exclude ShareUpdateExclusiveLock from observer warnings
1 parent 79ff961 commit ce93a5e
Copy full SHA for ce93a5e

File tree

3 files changed

+4
-3
lines changed
Filter options

3 files changed

+4
-3
lines changed

‎cmd/cli/commands/clone/actions.go

Copy file name to clipboardExpand all lines: cmd/cli/commands/clone/actions.go
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ func observeSummary() func(*cli.Context) error {
245245
}
246246

247247
if err := obs.CheckPerformanceRequirements(); err != nil {
248+
log.Err("Performance check error:", err)
248249
// Exit with error status without printing additional error logs.
249250
os.Exit(errorExitStatus)
250251
}

‎pkg/observer/observer.go

Copy file name to clipboardExpand all lines: pkg/observer/observer.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func (obs *Observer) PrintSummary() error {
184184

185185
// CheckPerformanceRequirements checks monitoring data and returns an error if any of performance requires was not satisfied.
186186
func (obs *Observer) CheckPerformanceRequirements() error {
187-
if obs.CheckDuration() || obs.CheckLocks() {
187+
if !obs.CheckDuration() || !obs.CheckLocks() {
188188
return errors.New("performance requirements not satisfied")
189189
}
190190

‎pkg/observer/queries.go

Copy file name to clipboardExpand all lines: pkg/observer/queries.go
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ const queryLocks = `with lock_data as (
3030
clock_timestamp() - a.state_change as state_changed_ago,
3131
a.pid
3232
from pg_stat_activity a
33-
join pg_locks l ON l.pid = a.pid
34-
where l.mode ~* 'exclusive'
33+
join pg_locks l on l.pid = a.pid
34+
where l.mode = 'AccessExclusiveLock' and l.locktype = 'relation'
3535
)
3636
select row_to_json(lock_data)
3737
from lock_data

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.