Go / Golang Snapshot Options infinite loop
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 1.6k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 126
Description
This function can not call itself, it will cause an infinite loop.
```
// Snapshot returns the receiver and allows Snapshot to satisfy the
// ReadTransaction interface.
func (s Snapshot) Options() TransactionOptions {
return s.Options()
}
```
must be
```
// Snapshot returns the receiver and allows Snapshot to satisfy the
// ReadTransaction interface.
func (s Snapshot) Options() TransactionOptions {
return TransactionOptions{s.transaction}
}
```
Contributor guide
Research direction
Start at the Go Snapshot.Options entry point shown in the issue and confirm that it calls itself recursively. Change the return to use the snapshot transaction as specified, then run the relevant Go tests to verify that Snapshot satisfies ReadTransaction without looping.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100