Skip to content

Instantly share code, notes, and snippets.

@markrmiller
markrmiller / scale_current_design.md
Last active October 4, 2021 06:37
How could the current design scale?

How can the current system design be so poor at scale and performance and yet also scale and perform like Ive discussed? Well, a tough part in terms of what I say it can do on little hardware and instances involves an absolute ton of work and changes that would take me lifetimes to push through committee that lets you create and load tons of SolrCores in parallel in 10s of milliseconds time each. But thats mostly relevant to my desire to be able to scale in every direction, collection, shards, replicas, all of that even per instance.

Ill gloss over a thousand things, skip over a thousand more. And I dont claim anything here is best way to go, the way anyone would want to go, the way anyone should go, or really anything other than, its an impl that fits the current design, can be ridiculously fast, can scale ridiculously well. That I know. The other things I dont even really care about much. Im up for a change in scenery actually at this point, but I do have a disagreement on some perceptions about current d

@markrmiller
markrmiller / test.md
Last active October 2, 2021 09:35
test

public DistributedMap(SolrZkClient zookeeper, String dir) { this.dir = dir;

ZkCmdExecutor cmdExecutor = new ZkCmdExecutor(zookeeper.getZkClientTimeout());
try {
  cmdExecutor.ensureExists(dir, zookeeper);
} catch (KeeperException e) {
  throw new SolrException(ErrorCode.SERVER_ERROR, e);
} catch (InterruptedException e) {
  Thread.currentThread().interrupt();
@markrmiller
markrmiller / High level leader sync.rst
Last active October 11, 2021 19:33
High level leader sync

High level leader sync

Contents

  • This type of thing should not even be necessary here, but out of scope.
@markrmiller
markrmiller / cache fail
Created September 19, 2021 05:32
cache fail
352989 ERROR (TEST-TestSolrQueryParser.testLocalParamsInQP-seed#[E59DE5C6A7A2FBAD]) [ ] o.a.s.h.RequestHandlerBase java.lang.IllegalStateException: Recursive update
=> java.lang.IllegalStateException: Recursive update
at java.base/java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1983)
java.lang.IllegalStateException: Recursive update
at java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1983) ~[?:?]
at com.github.benmanes.caffeine.cache.BoundedLocalCache.doComputeIfAbsent(BoundedLocalCache.java:2411) ~[caffeine-2.9.2.jar:?]
at com.github.benmanes.caffeine.cache.BoundedLocalCache.computeIfAbsent(BoundedLocalCache.java:2394) ~[caffeine-2.9.2.jar:?]
at com.github.benmanes.caffeine.cache.LocalCache.computeIfAbsent(LocalCache.java:108) ~[caffeine-2.9.2.jar:?]
at com.github.benmanes.caffeine.cache.LocalManualCache.get(LocalManualCache.java:62) ~[caffeine-2.9.2.jar:?]
at org.apache.solr.search.CaffeineCache.computeIfAbsent(CaffeineCache.java:248) ~[main/:?
@markrmiller
markrmiller / perfasm
Created September 12, 2021 16:38
perfasm
....................................................................................................
38.25% <total for region 1>
....[Hottest Region 2]..............................................................................
runtime stub, StubRoutines::jlong_disjoint_arraycopy (121 bytes)
StubRoutines::jlong_disjoint_arraycopy [0x00007f490088e5e0, 0x00007f490088e65a[ (122 bytes)
0.02% 0x00007f490088e5e0: push %rbp
0.01% 0x00007f490088e5e1: mov %rsp,%rbp
0.00% 0x00007f490088e5e4: lea -0x8(%rdi,%rdx,8),%rdi
/usr/lib/jvm/java-11-openjdk/bin/java -ea -Didea.test.cyclic.buffer.size=2097152 -javaagent:/home/markmiller/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.5284.19/lib/idea_rt.jar=33833:/home/markmiller/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.5284.19/bin -Dfile.encoding=UTF-8 -classpath /home/markmiller/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.5284.19/lib/idea_rt.jar:/home/markmiller/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/212.5284.19/plugins/junit/lib/junit5-rt.jar:/home/markmiller/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-
2021-09-02 16:46:01.671 INFO (TEST-DockMakerTest.testGenDoc-seed#[7537E3CCB860317F]) [ ] o.a.s.b.DockMakerTest
***** Random Data Gen Reports *****
2021-09-02 16:46:01.671 INFO (TEST-DockMakerTest.testGenDoc-seed#[7537E3CCB860317F]) [ ] o.a.s.b.DockMakerTest
2021-09-02 10:03:23.951 INFO (TEST-DockMakerTest.testWordListZipfian-seed#[F590CC1AF59A858E]) [ ] o.a.s.b.DockMakerTest
***** Random Data Gen Reports *****
2021-09-02 10:03:23.951 INFO (TEST-DockMakerTest.testWordListZipfian-seed#[F590CC1AF59A858E]) [ ] o.a.s.b.DockMakerTest
.jbyte_disjoint_arraycopy() 115
void java.lang.String.getBytes(byte[], int, byte) 30
int java.lang.StringConcatHelper.prepend(int, byte[], byte, java.lang.String) 30
int java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(java.lang.Object, int, java.lang.Object, int, java.lang.Object) 30
Object java.lang.invoke.LambdaForm$MH.949904619.invoke(java.lang.Object, java.lang.Object, java.lang.Object) 25
Object java.lang.invoke.LambdaForm$MH.1954204699.invoke(java.lang.Object, java.lang.Object, java.lang.Object) 25
Object java.lang.invoke.Invokers$Holder.linkToTargetMethod(java.lang.Object, java.lang.Object, java.lang.Object) 25
String org.apache.lucene.store.IndexInput.getFullSliceDescription(java.lang.String) 25
ByteBufferIndexInput org.apache.lucene.store.ByteBufferIndexInput.buildSlice(java.lang.String, long, long) 25
ByteBufferIndexInput org.apache.lucene.store.ByteBufferIndexInput.slice(java.lang.String, long, long) 25
[
{
"jmhVersion" : "1.29",
"benchmark" : "org.apache.solr.bench.index.CloudIndexing.indexLargeDoc",
"mode" : "thrpt",
"threads" : 5,
"forks" : 1,
"jvm" : "/Library/Java/JavaVirtualMachines/applejdk-11.0.11.9.1.jdk/Contents/Home/bin/java",
"jvmArgs" : [
"-Xms4g",
[
{
"jmhVersion" : "1.29",
"benchmark" : "org.apache.solr.bench.index.CloudIndexing.indexLargeDoc",
"mode" : "thrpt",
"threads" : 5,
"forks" : 1,
"jvm" : "/Library/Java/JavaVirtualMachines/applejdk-11.0.11.9.1.jdk/Contents/Home/bin/java",
"jvmArgs" : [
"-Xms4g",