Order nodes by random (#1197)

This commit is contained in:
Maximillian von Briesen 2019-01-31 14:33:07 -05:00 committed by GitHub
parent ba5097c13d
commit c46864449d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,7 +63,9 @@ func (cache *overlaycache) queryFilteredNodes(ctx context.Context, excluded []st
audit_uptime_ratio, audit_count, audit_success_count, uptime_count, audit_uptime_ratio, audit_count, audit_success_count, uptime_count,
uptime_success_count uptime_success_count
FROM overlay_cache_nodes FROM overlay_cache_nodes
`+safeQuery+safeExcludeNodes+` LIMIT ?`), args...) `+safeQuery+safeExcludeNodes+`
ORDER BY RANDOM()
LIMIT ?`), args...)
if err != nil { if err != nil {
return nil, err return nil, err
} }