Commit ca461a3
authored
Change VisibilityRow execution duration type to int64 (#10524)
## What changed?
Change `VisibilityRow.ExecutionDuration` type from `*time.Duration` to
`*int64`.
## Why?
`time.Duration` is not always translated correctly to integer values
when inserting into the database (eg: `jackc/pgx` module with connection
attributes `default_query_exec_mode: simple_protocol` translates
`time.Duration` into a string instead of an integer).
Furthermore, the VisibilityRow is meant to represent the values from DB,
so making it `int64` also makes it more explicitly.
#10514
## How did you test it?
- [x] built
- [x] run locally and tested manually
- [x] covered by existing tests (updated existing tests)
- [ ] added new unit test(s)
- [ ] added new functional test(s)
## Potential risks
Users implementing their own `VisibilityStore` based on the SQL
implementation which uses the `VisibilityRow` might need to double check
their code.1 parent 93056af commit ca461a3
3 files changed
Lines changed: 5 additions & 5 deletions
File tree
- common/persistence
- sql/sqlplugin
- tests
- visibility/store/sql
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1395 | 1395 | | |
1396 | 1396 | | |
1397 | 1397 | | |
1398 | | - | |
| 1398 | + | |
1399 | 1399 | | |
1400 | | - | |
| 1400 | + | |
1401 | 1401 | | |
1402 | 1402 | | |
1403 | 1403 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
852 | 852 | | |
853 | 853 | | |
854 | 854 | | |
855 | | - | |
| 855 | + | |
856 | 856 | | |
857 | 857 | | |
858 | 858 | | |
| |||
0 commit comments