dolthub / dolthub/dolt

Commit Closure `Contains` Method is too slow for DoltHub

Open
#6,035 0 comments 0 reactions 0 assignees View on GitHub
bug customer issue performance version control
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 5h
Merged PRs (30d)
108

Description

A Customer on DoltHub is experiencing timeouts when attempting to view a pull request. The pull request page loads the error `Request Timeout`, since it took longer than 15 seconds for the API to send a response to the client.

The reason attempting to view this pull request is timing out is because the call [here](https://github.com/dolthub/ld/blob/main/go/services/dolthubapi/pkg/domain/repositorydata.go#L854) takes > 13 seconds for the commit `h7kfprlds1bdn3l4ki4f6bqo83iuhtib`.

```
DEBUG: getDotDotRevision: excludingClosure.Contains elapsed: 13.255603906s
```

This is the interface definition.
```
// CommitClosure is a transitive closure of commit parents.
type CommitClosure interface {
// Contains returns true if |commit| is contained in the closure.
Contains(ctx context.Context, commit *Commit) (bool, error)
}
```

Filing this issue so that we can determine if this is expected for the given commit, or if this is a bug.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.