Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(bugfix): Fix inconsistent getCount() return values #26

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions core/dbio/database/database_proton.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,9 @@ func processProtonInsertRow(columns iop.Columns, row []any) []any {

// GetCount returns count of records
func (conn *ProtonConn) GetCount(tableFName string) (uint64, error) {
// Add another sleep, reason: after insert table we try to getcount directly to ensure no record missing
// but proton seems not fully ready to get count.
time.Sleep(countWaitDuration)
var count uint64

// Retry logic to handle occasional zero count, likely due to database latency or transactional delays.
Expand Down