VictoriaMetrics/app
Aliaksandr Valialkin 96f04c9863
app/vmselect/netstorage: consistently select the sample with the biggest value out of samples with identical timestamps
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3333

This fix is based on https://github.com/VictoriaMetrics/VictoriaMetrics/pull/3620 ,
but doesn't slow down the common case with merging replicated data blocks so significantly.

Benchmark results:

Before the change:

BenchmarkMergeSortBlocks/replicationFactor-1-4         	   13968	     85643 ns/op	 956.53 MB/s	    1700 B/op	       1 allocs/op
BenchmarkMergeSortBlocks/replicationFactor-2-4         	   10806	    109171 ns/op	1500.77 MB/s	    2191 B/op	       1 allocs/op
BenchmarkMergeSortBlocks/replicationFactor-3-4         	    8887	    130623 ns/op	1881.45 MB/s	    2660 B/op	       1 allocs/op
BenchmarkMergeSortBlocks/replicationFactor-4-4         	    7440	    157348 ns/op	2082.52 MB/s	    3174 B/op	       1 allocs/op
BenchmarkMergeSortBlocks/replicationFactor-5-4         	    6534	    184473 ns/op	2220.38 MB/s	    3612 B/op	       1 allocs/op
BenchmarkMergeSortBlocks/overlapped-blocks-bestcase-4  	   13419	     85205 ns/op	 961.44 MB/s	    2213 B/op	       1 allocs/op
BenchmarkMergeSortBlocks/overlapped-blocks-worstcase-4 	     579	   1894900 ns/op	  43.23 MB/s	   46760 B/op	       1 allocs/op

After the change:

BenchmarkMergeSortBlocks/replicationFactor-1-4         	   13832	     85298 ns/op	 960.40 MB/s	    1716 B/op	       1 allocs/op
BenchmarkMergeSortBlocks/replicationFactor-2-4         	    8833	    134222 ns/op	1220.66 MB/s	    2675 B/op	       1 allocs/op
BenchmarkMergeSortBlocks/replicationFactor-3-4         	    6487	    184830 ns/op	1329.65 MB/s	    3636 B/op	       1 allocs/op
BenchmarkMergeSortBlocks/replicationFactor-4-4         	    4977	    236318 ns/op	1386.61 MB/s	    4733 B/op	       1 allocs/op
BenchmarkMergeSortBlocks/replicationFactor-5-4         	    4088	    296734 ns/op	1380.36 MB/s	    5761 B/op	       1 allocs/op
BenchmarkMergeSortBlocks/overlapped-blocks-bestcase-4  	   14083	     84067 ns/op	 974.47 MB/s	    2110 B/op	       1 allocs/op
BenchmarkMergeSortBlocks/overlapped-blocks-worstcase-4 	     536	   2043534 ns/op	  40.09 MB/s	   50511 B/op	       1 allocs/op
2023-01-09 12:58:18 -08:00
..
vmagent all: small improvements in error messages and command-line flag descriptions related to concurrency limiters 2023-01-07 00:12:24 -08:00
vmalert docs: update -help outputs for vm* tools 2023-01-03 23:27:31 -08:00
vmauth docs: update -help outputs for vm* tools 2023-01-03 23:27:31 -08:00
vmbackup docs: update -help outputs for vm* tools 2023-01-03 23:27:31 -08:00
vmbackupmanager doc: add vmbackupmanager monitoring section (#3605) 2023-01-05 16:49:59 -08:00
vmctl Fix vmctl command hint for vm-native-step-interval (#3575) 2023-01-03 21:49:15 -08:00
vmgateway docs: update -help outputs for vm* tools 2023-01-03 23:27:31 -08:00
vminsert lib/writeconcurrencylimiter: improve the logic behind -maxConcurrentInserts limit 2023-01-06 22:07:16 -08:00
vmrestore docs: update -help outputs for vm* tools 2023-01-03 23:27:31 -08:00
vmselect app/vmselect/netstorage: consistently select the sample with the biggest value out of samples with identical timestamps 2023-01-09 12:58:18 -08:00
vmstorage lib/writeconcurrencylimiter: improve the logic behind -maxConcurrentInserts limit 2023-01-06 22:07:16 -08:00
vmui vmui: improve Explore metrics (#3598) 2023-01-05 02:24:05 -08:00