When trying to help Working with SHA1 value., I encountered some fundamental SPL limitation with large numbers starting around 10000000000000000 (10 trillion). But Splunk gives no error, just behaves erratically. Take this example,
| makeresults
| eval i = mvrange(1, 20)
| eval a = mvmap(i, 1000000000000000 + i)
| eval b = mvmap(i, 10000000000000000 - i)
| eval c = mvmap(i, 10000000000000000 + i)
| eval d = mvmap(i, 100000000000000000 + i)
| eval e = mvmap(i, 1000000000000000000 + i)
a | b | c | d | e | i |
1000000000000001 1000000000000002 1000000000000003 1000000000000004 1000000000000005 1000000000000006 1000000000000007 1000000000000008 1000000000000009 1000000000000010 1000000000000011 1000000000000012 1000000000000013 1000000000000014 1000000000000015 1000000000000016 1000000000000017 1000000000000018 1000000000000019 | 10000000000000000 9999999999999998 9999999999999996 9999999999999996 9999999999999996 9999999999999994 9999999999999992 9999999999999992 9999999999999992 9999999999999990 9999999999999988 9999999999999988 9999999999999988 9999999999999986 9999999999999984 9999999999999984 9999999999999984 9999999999999982 9999999999999980 | 10000000000000000 10000000000000002 10000000000000004 10000000000000004 10000000000000004 10000000000000006 10000000000000008 10000000000000008 10000000000000008 10000000000000010 10000000000000012 10000000000000012 10000000000000012 10000000000000014 10000000000000016 10000000000000016 10000000000000016 10000000000000018 10000000000000020 | 100000000000000000 100000000000000000 100000000000000000 100000000000000000 100000000000000000 100000000000000000 100000000000000000 100000000000000000 100000000000000020 100000000000000020 100000000000000020 100000000000000020 100000000000000020 100000000000000020 100000000000000020 100000000000000020 100000000000000020 100000000000000020 100000000000000020 | 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
In other words, as the number approaches 10^13, SPL can no longer maintain sequence. Certain numbers (10,000,000,000,000,000, 100,000,000,000,000,000, 1,000,000,000,000,000,000, etc.) are still being presented, but not many numbers in between.
Is there documentation about this? Is this configurable in limits.conf?
Not having errors makes this a dangerous condition. So, I definitely consider this a bug. In modern computing, 10 trillion is not terribly large; even shell can handle it.
$ for i in `seq 20`; do expr 10000000000000000 + $i; done
10000000000000001
10000000000000002
10000000000000003
10000000000000004
10000000000000005
10000000000000006
10000000000000007
10000000000000008
10000000000000009
10000000000000010
10000000000000011
10000000000000012
10000000000000013
10000000000000014
10000000000000015
10000000000000016
10000000000000017
10000000000000018
10000000000000019
10000000000000020
(You can try it in any shell.)