<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kirill A. Korinsky on Medium]]></title>
        <description><![CDATA[Stories by Kirill A. Korinsky on Medium]]></description>
        <link>https://medium.com/@catap?source=rss-15e1406c4812------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*WOmaFl6LKrvs_Yyu.jpg</url>
            <title>Stories by Kirill A. Korinsky on Medium</title>
            <link>https://medium.com/@catap?source=rss-15e1406c4812------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 16:51:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@catap/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The blog was migrated due to the platform’s ToS]]></title>
            <link>https://catap.medium.com/the-blog-was-migrated-due-to-the-platforms-tos-baab8fc64840?source=rss-15e1406c4812------2</link>
            <guid isPermaLink="false">https://medium.com/p/baab8fc64840</guid>
            <category><![CDATA[medium]]></category>
            <dc:creator><![CDATA[Kirill A. Korinsky]]></dc:creator>
            <pubDate>Tue, 02 Dec 2025 08:51:59 GMT</pubDate>
            <atom:updated>2025-12-02T08:51:59.279Z</atom:updated>
            <content:encoded><![CDATA[<p>Frankly, it happened a few years ago, but I never had the time to write about it here. Now I do.</p><p>Almost a decade ago, Medium was a nice platform, but it has changed over the years. How? They monetized everything.</p><p>If you don’t care, they will still do it for you.</p><p>This blog migrated a while ago to <a href="https://kirill.korins.ky/">https://kirill.korins.ky/</a></p><p>Enjoy!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=baab8fc64840" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to install OpenBSD to Herzner server with NVMe without KVM nor VNC]]></title>
            <link>https://catap.medium.com/how-to-install-openbsd-to-herzner-server-with-nvme-without-kvm-nor-vnc-ff716bdd38cf?source=rss-15e1406c4812------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff716bdd38cf</guid>
            <category><![CDATA[openbsd]]></category>
            <category><![CDATA[qemu]]></category>
            <category><![CDATA[hetzner]]></category>
            <dc:creator><![CDATA[Kirill A. Korinsky]]></dc:creator>
            <pubDate>Mon, 25 Dec 2023 13:30:17 GMT</pubDate>
            <atom:updated>2025-12-02T08:53:24.997Z</atom:updated>
            <content:encoded><![CDATA[<p>This blog post was migrated to: <a href="https://kirill.korins.ky/articles/installation-of-openbsd-on-headless-server-without-kvm-or-vnc/">https://kirill.korins.ky/articles/installation-of-openbsd-on-headless-server-without-kvm-or-vnc/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff716bdd38cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to install macOS before 10.7 under VMware or Parallels]]></title>
            <link>https://catap.medium.com/how-to-install-macos-10-6-under-vmware-or-parallels-472dc8677973?source=rss-15e1406c4812------2</link>
            <guid isPermaLink="false">https://medium.com/p/472dc8677973</guid>
            <category><![CDATA[macos]]></category>
            <dc:creator><![CDATA[Kirill A. Korinsky]]></dc:creator>
            <pubDate>Sun, 10 Apr 2022 17:22:51 GMT</pubDate>
            <atom:updated>2025-12-02T21:39:02.410Z</atom:updated>
            <content:encoded><![CDATA[<p>This blog post was moved to <a href="https://kirill.korins.ky/articles/installing-macos-10.6-snow-leopard-in-virtual-machines/">https://kirill.korins.ky/articles/installing-macos-10.6-snow-leopard-in-virtual-machines/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=472dc8677973" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to fix internet on old macOS]]></title>
            <link>https://catap.medium.com/how-to-fix-internet-on-old-macos-c7061401ab35?source=rss-15e1406c4812------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7061401ab35</guid>
            <category><![CDATA[macos-mojave]]></category>
            <category><![CDATA[macos]]></category>
            <category><![CDATA[lets-encrypt]]></category>
            <category><![CDATA[libressl]]></category>
            <dc:creator><![CDATA[Kirill A. Korinsky]]></dc:creator>
            <pubDate>Sun, 10 Oct 2021 10:36:30 GMT</pubDate>
            <atom:updated>2021-10-10T15:59:04.145Z</atom:updated>
            <content:encoded><![CDATA[<p>A few days ago Let’s Encrypt root certificate was expired. It was planned and announced: <a href="https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/">https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/</a> in advance but still, some side effects exist.</p><p>For example, macOS 10.14 can’t connect to anything which is used Let’s Encrypt SSL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/783/1*q3ef2F4Zn0eFq5ovqy0SGQ.png" /></figure><p>The good news is that it is quite easy to fix. Just run:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6232518f58608c2cc665c2f154775371/href">https://medium.com/media/6232518f58608c2cc665c2f154775371/href</a></iframe><p>This simple code is removing an expired certificate.</p><p>The root cause of this issue is a bug inside LibreSSL which was used in macOS 10.14 and cross-self-signing between roots Let’s Encrypt’s root CAs.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7061401ab35" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Germany COVID-19 impact: alternative point of view]]></title>
            <link>https://catap.medium.com/germany-covid-19-impact-alternative-point-of-view-a9a155c8c971?source=rss-15e1406c4812------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9a155c8c971</guid>
            <category><![CDATA[simpsons-paradox]]></category>
            <category><![CDATA[statistical-analysis]]></category>
            <category><![CDATA[covid19]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[germany]]></category>
            <dc:creator><![CDATA[Kirill A. Korinsky]]></dc:creator>
            <pubDate>Thu, 01 Apr 2021 05:44:32 GMT</pubDate>
            <atom:updated>2025-12-02T16:24:57.665Z</atom:updated>
            <content:encoded><![CDATA[<p>This blog post was moved to <a href="https://kirill.korins.ky/articles/covid-19-mortality-in-germany-an-alternative-statistical-analysis/">https://kirill.korins.ky/articles/covid-19-mortality-in-germany-an-alternative-statistical-analysis/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9a155c8c971" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to run SBT on Apple Silicon]]></title>
            <link>https://catap.medium.com/how-to-run-sbt-on-apple-silicon-adeedf216cd5?source=rss-15e1406c4812------2</link>
            <guid isPermaLink="false">https://medium.com/p/adeedf216cd5</guid>
            <category><![CDATA[apple-silicon]]></category>
            <category><![CDATA[apple-m1]]></category>
            <category><![CDATA[apple-m1-chip]]></category>
            <category><![CDATA[bts]]></category>
            <dc:creator><![CDATA[Kirill A. Korinsky]]></dc:creator>
            <pubDate>Wed, 25 Nov 2020 00:08:55 GMT</pubDate>
            <atom:updated>2020-11-26T03:28:52.839Z</atom:updated>
            <content:encoded><![CDATA[<p>It is quite simple after a couple of days of fixing.</p><p>I assume that you’re using <a href="https://www.macports.org/">MacPorts</a> that is working :)</p><p>First, you need something that we call bootstrap java. AdoptOpenJDK 1.8 isn’t ported and MacPorts complains about it, but we need it.</p><p>So, let install it and SBT.</p><pre>catap@Kirills-mini-m1 ~ % sudo port install openjdk8 sbt  <br>---&gt;  Installing openjdk8 <a href="http://twitter.com/8u275_0">@8u275_0</a><br>---&gt;  Activating openjdk8 <a href="http://twitter.com/8u275_0">@8u275_0</a><br>---&gt;  Cleaning openjdk8<br>---&gt;  Computing dependencies for sbt<br>---&gt;  Fetching archive for sbt<br>---&gt;  Attempting to fetch sbt-0.13.18_0.darwin_20.noarch.tbz2 from <a href="https://packages.macports.org/sbt">https://packages.macports.org/sbt</a><br>---&gt;  Attempting to fetch sbt-0.13.18_0.darwin_20.noarch.tbz2 from <a href="https://lil.fr.packages.macports.org/sbt">https://lil.fr.packages.macports.org/sbt</a><br>---&gt;  Attempting to fetch sbt-0.13.18_0.darwin_20.noarch.tbz2 from <a href="https://nue.de.packages.macports.org/sbt">https://nue.de.packages.macports.org/sbt</a><br>---&gt;  Fetching distfiles for sbt<br>Warning: Failed to confirm that required Java was installed; see <a href="https://trac.macports.org/ticket/61445">https://trac.macports.org/ticket/61445</a><br>---&gt;  Verifying checksums for sbt<br>---&gt;  Extracting sbt<br>---&gt;  Configuring sbt<br>---&gt;  Building sbt<br>---&gt;  Staging sbt into destroot<br>---&gt;  Installing sbt <a href="http://twitter.com/0">@0</a>.13.18_0<br>---&gt;  Activating sbt <a href="http://twitter.com/0">@0</a>.13.18_0<br>---&gt;  Cleaning sbt<br>---&gt;  Updating database of binaries<br>---&gt;  Scanning binaries for linking errors<br>---&gt;  Found 8 broken files, matching files to ports<br>---&gt;  Found 1 broken port, determining rebuild order<br>You can always run &#39;port rev-upgrade&#39; again to fix errors.<br>The following ports will be rebuilt: openjdk8 <a href="http://twitter.com/8u275">@8u275</a><br>Continue? [Y/n]: n<br>---&gt;  Some of the ports you installed have notes:<br>  openjdk8 has the following notes:<br>    If you have more than one JDK installed you can make openjdk8 the default<br>    by adding the following line to your shell profile:<br>    <br>        export JAVA_HOME=/Library/Java/JavaVirtualMachines/openjdk8/Contents/Home<br>catap@Kirills-mini-m1 ~ %</pre><p>Good, we have very old SBT-0.13.8 and JDK that isn’t native and ports complaints to it. Let start to fix it.</p><p>Now we need a brand, new, unreleased (yet) SBT that we will use as boot sbt. Let build one. To do that we need unreleased upstream from SBT and <a href="https://github.com/sbt/sbt/issues/6162#issuecomment-733122373">one patch</a> to switch some dependencies to the latest version that contains fixes.</p><pre>catap@Kirills-mini-m1 ~ % mkdir -p ~/src<br>catap@Kirills-mini-m1 ~ % cd ~/src<br>catap@Kirills-mini-m1 src % git clone <a href="https://github.com/sbt/sbt.git">https://github.com/sbt/sbt.git</a>                                                            <br>Cloning into &#39;sbt&#39;...<br>remote: Enumerating objects: 238, done.<br>remote: Counting objects: 100% (238/238), done.<br>remote: Compressing objects: 100% (169/169), done.<br>remote: Total 112828 (delta 81), reused 147 (delta 44), pack-reused 112590<br>Receiving objects: 100% (112828/112828), 25.58 MiB | 14.42 MiB/s, done.<br>Resolving deltas: 100% (52326/52326), done.<br>catap@Kirills-mini-m1 src % cd sbt<br>catap@Kirills-mini-m1 sbt % curl -s <a href="https://gist.githubusercontent.com/catap/8396d51fbb0242e800aa05e395f16366/raw/656c532757f710e07ad177a4154f59968d0c780d/sbt-dependencies.patch">https://gist.githubusercontent.com/catap/8396d51fbb0242e800aa05e395f16366/raw/656c532757f710e07ad177a4154f59968d0c780d/sbt-dependencies.patch</a> | patch -p1<br>patching file build.sbt<br>patching file project/Dependencies.scala<br>patch unexpectedly ends in middle of line<br>Hunk #1 succeeded at 26 with fuzz 1.<br>catap@Kirills-mini-m1 sbt % sbt publishLocal &gt; /dev/null     <br>catap@Kirills-mini-m1 sbt %</pre><p>Good, now we should flush boot cache of sbt:</p><pre>catap@Kirills-mini-m1 sbt % rm -rf ~/.sbt/boot<br>catap@Kirills-mini-m1 sbt %</pre><p>force SBT to use our version:</p><pre>catap@Kirills-mini-m1 sbt % cat &gt; ~/.sbtconfig<br>JAVA_OPTS=&quot;-Dsbt.version=1.5.0-SNAPSHOT&quot;<br>^D<br>catap@Kirills-mini-m1 sbt %</pre><p>and switch IPC inside SBT to TCP</p><pre>catap@Kirills-mini-m1 sbt % cat &gt; ~/.sbt/1.0/global.sbt <br>Global / serverConnectionType := ConnectionType.Tcp<br>^D<br>catap@Kirills-mini-m1 sbt %</pre><p>Good. Now we can remove AdoptOpenJDK and install <a href="https://github.com/macports/macports-ports/pull/9226">ZuluJDK8 or ZuluJDK11</a> that is native for this platform:</p><pre>catap@Kirills-mini-m1 sbt % sudo port uninstall openjdk8<br>Note: It is not recommended to uninstall/deactivate a port that has dependents as it breaks the dependents.<br>The following ports will break:<br> sbt <a href="http://twitter.com/0">@0</a>.13.18_0<br> sbt <a href="http://twitter.com/0">@0</a>.13.18_0<br>Continue? [y/N]: y<br>Warning: Uninstall forced.  Proceeding despite dependencies.<br>---&gt;  Deactivating openjdk8 <a href="http://twitter.com/8u275_0">@8u275_0</a><br>---&gt;  Cleaning openjdk8<br>---&gt;  Uninstalling openjdk8 <a href="http://twitter.com/8u275_0">@8u275_0</a><br>---&gt;  Cleaning openjdk8<br>catap@Kirills-mini-m1 sbt % sudo port install zulu-jdk11<br>---&gt;  Computing dependencies for zulu-jdk11<br>---&gt;  Fetching distfiles for zulu-jdk11<br>---&gt;  Verifying checksums for zulu-jdk11<br>---&gt;  Extracting zulu-jdk11<br>---&gt;  Configuring zulu-jdk11<br>---&gt;  Building zulu-jdk11<br>---&gt;  Staging zulu-jdk11 into destroot<br>Warning: zulu-jdk11 installs files outside the common directory structure.<br>---&gt;  Installing zulu-jdk11 <a href="http://twitter.com/11">@11</a>.43.1007_0<br>---&gt;  Activating zulu-jdk11 <a href="http://twitter.com/11">@11</a>.43.1007_0<br>---&gt;  Cleaning zulu-jdk11<br>---&gt;  Updating database of binaries<br>---&gt;  Scanning binaries for linking errors<br>---&gt;  No broken files found.<br>---&gt;  No broken ports found.<br>---&gt;  Some of the ports you installed have notes:<br>  zulu-jdk11 has the following notes:<br>    If you have more than one JDK installed you can make zulu-jdk11 the default<br>    by adding the following line to your shell profile:<br>    <br>        export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-jdk11/Contents/Home<br>catap@Kirills-mini-m1 sbt %</pre><p>Congrats! You have SBT that is working fine on Apple Silicon.</p><pre>catap@Kirills-mini-m1 sbt % mkdir -p /tmp/sbt-test <br>catap@Kirills-mini-m1 sbt % cd /tmp/sbt-test <br>catap@Kirills-mini-m1 sbt-test % sbt<br>[info] Updated file /private/tmp/sbt-test/project/build.properties: set sbt.version to 1.5.0-SNAPSHOT<br>[info] welcome to sbt 1.5.0-SNAPSHOT (Azul Systems, Inc. Java 11.0.9.1)<br>[info] loading project definition from /private/tmp/sbt-test/project<br>[info] set current project to sbt-test (in build file:/private/tmp/sbt-test/)<br>[info] sbt server started at tcp://127.0.0.1:5715<br>[info] started sbt server<br>sbt:sbt-test&gt;</pre><p>I hope soon everything will be merged, and you will need just upgrade SBT.</p><p>P.S. SBT 1.4.3 supports Apple Silicon. You can use 1.4.x branch and do not apply any patches.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=adeedf216cd5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scala vs Java 15]]></title>
            <link>https://catap.medium.com/scala-vs-java-15-800ad070125f?source=rss-15e1406c4812------2</link>
            <guid isPermaLink="false">https://medium.com/p/800ad070125f</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[bugs]]></category>
            <category><![CDATA[scala]]></category>
            <dc:creator><![CDATA[Kirill A. Korinsky]]></dc:creator>
            <pubDate>Sun, 11 Oct 2020 02:43:53 GMT</pubDate>
            <atom:updated>2020-10-11T03:17:11.250Z</atom:updated>
            <content:encoded><![CDATA[<p>Do you know that Scala can’t work on Java since version 15?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_eT4Ydltbe1_-bTDuscrkg.png" /></figure><p>Why?</p><p>The cause is <a href="https://github.com/openjdk/jdk/commit/113c48f5da32b26a4f820ccd0e43dae3eba7b73e">openjdk/jdk@113c48f</a> that introduced isEmpty method to java.lang.CharSequence since Java 15.</p><p>My code can’t be compiled on Java 15+ because isEmpty can be used from scala.collection.ArrayOps[Char] and from ArrayCharSequence that inherits java.lang.CharSequence with a brand new isEmpty.</p><p>Can it be solve? Only with hack at Scala compiler.</p><p>The good news that anything that was build before can be run on Java 15.</p><p>Scala usessize method inside ArrayOps to overstep similar issue with length that is implemented inside Java’s array for example and I have no idea how it is possibly to solve without renaming method on Scala side.</p><p>Anyway you can enjoy <a href="https://github.com/scala/bug/issues/12172">discussion</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=800ad070125f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2019-nCoV from WHO as exponential regression]]></title>
            <link>https://catap.medium.com/2019-ncov-from-who-as-exponential-regression-ddcda2ac180f?source=rss-15e1406c4812------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddcda2ac180f</guid>
            <category><![CDATA[ncov-2019]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[regression]]></category>
            <dc:creator><![CDATA[Kirill A. Korinsky]]></dc:creator>
            <pubDate>Mon, 27 Jan 2020 01:37:16 GMT</pubDate>
            <atom:updated>2020-01-28T08:50:10.303Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s play with 2019-nCoV from WHO.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*_qoaFqMVgjstmtJNp-zNrw.png" /><figcaption>Disclaimer: it is a joke</figcaption></figure><p>We had a bit data from WHO here: <a href="https://www.who.int/emergencies/diseases/novel-coronavirus-2019/situation-reports/">https://www.who.int/emergencies/diseases/novel-coronavirus-2019/situation-reports/</a></p><p>We can extract from it that number of cases was:</p><blockquote>44 cases at 3rd day of the year</blockquote><blockquote>282 cases at 20th day of the year</blockquote><blockquote>314 cases at 21st day of the year</blockquote><blockquote>581 cases at 22nd day of the year</blockquote><blockquote>846 cases at 24th day of the year</blockquote><blockquote>1320 cases at 25th day of the year</blockquote><blockquote>2014 [was predicted as 1843, error 9.2%] as 26th day of the year</blockquote><blockquote>2798 [was predicted as 2950, error 5.1%] as 27th day of the year</blockquote><p>It looks like exponential regression, isn’t it?</p><p>Let use WolframAlpha to draw it: <a href="https://www.wolframalpha.com/input/?i=exponential+fit+%7B%283%2C44%29%2C%2820%2C282%29%2C%2821%2C314%29%2C%2823%2C581%29%2C%2824%2C846%29%2C%2825%2C1320%29%2C%2826%2C2014%29%7D">https://www.wolframalpha.com/input/?i=exponential+fit+%7B%283%2C44%29%2C%2820%2C282%29%2C%2821%2C314%29%2C%2823%2C581%29%2C%2824%2C846%29%2C%2825%2C1320%29%2C%2826%2C2014%29%7D</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*1HMxzgv3E8cOOUZXsA_Ecw.gif" /></figure><p>Well, we have a formula: 0.0671343 e^(0.395955 x)</p><p>Let replace x to some days in the near future:</p><blockquote>1st February (32nd day): 21,364 cases</blockquote><blockquote>14th February (45th day): 3.7 millions cases</blockquote><blockquote>1st March (60th day): 1.4 billions cases</blockquote><blockquote>5th March (64th day): about 7 billions cases</blockquote><p><strong>Congrats</strong>, everyone is infected!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddcda2ac180f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Elasticsearch under Shenandoah]]></title>
            <link>https://catap.medium.com/elasticsearch-under-shenandoah-7b019d5a587c?source=rss-15e1406c4812------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b019d5a587c</guid>
            <category><![CDATA[cg]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[jvm]]></category>
            <category><![CDATA[java]]></category>
            <dc:creator><![CDATA[Kirill A. Korinsky]]></dc:creator>
            <pubDate>Wed, 26 Dec 2018 12:01:09 GMT</pubDate>
            <atom:updated>2019-03-12T21:26:59.201Z</atom:updated>
            <content:encoded><![CDATA[<p>How you may know I’m in love with <a href="https://wiki.openjdk.java.net/display/shenandoah/Main">Shenandoah</a>. Here I’d like to share with you some results over running elastic search under Shenandoah.</p><p>This experiment was made on unnamed cluster with dozens of machine and I’d like to share only two pictures. One from node with enabled Shenandoah for last week, and second one has G1 with settings closer to that <a href="https://medium.com/@catap/use-elasticsearch-as-today-not-as-day-before-yesterday-7958325bf2a8">I described before</a>. Both machine has very similar number of segments and this cluster uses almost for writing. Let say 99% of operation it is writing.</p><p>Summary: at peaks loading it is much better and at night it is similar. So, it is expected behaviour to be honest. Also it removes full GC that brokes this cluster time-to-time.</p><p>You can see some result at the graph for last 24 hours:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-maYUoyFyg5F9hObxBUkJg.png" /><figcaption>G1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c0l088kprSJp6zUaZag_BA.png" /><figcaption>Shenandoah</figcaption></figure><p>But it has two issues:</p><ol><li>Internal metrics for GC counts doesn’t work at all.</li><li>Shenandoah makes a lot of things as separated non blocking threads and it brokes logic of JvmGcMonitorService, and logs full of lines like:</li></ol><pre>[2018-12-26T12:57:40,974][WARN ][o.e.m.j.JvmGcMonitorService] [es9-main] [gc][422543] overhead, spent [770ms] collecting in the last [1s]</pre><pre>[2018-12-26T12:57:50,976][WARN ][o.e.m.j.JvmGcMonitorService] [es9-main] [gc][422553] overhead, spent [1.3s] collecting in the last [1s]</pre><pre>[2018-12-26T12:57:58,978][WARN ][o.e.m.j.JvmGcMonitorService] [es9-main] [gc][422561] overhead, spent [929ms] collecting in the last [1s]</pre><pre>[2018-12-26T12:58:06,979][WARN ][o.e.m.j.JvmGcMonitorService] [es9-main] [gc][422569] overhead, spent [946ms] collecting in the last [1s]</pre><pre>[2018-12-26T12:58:15,981][WARN ][o.e.m.j.JvmGcMonitorService] [es9-main] [gc][422578] overhead, spent [749ms] collecting in the last [1s]</pre><p>Costs? Well, it increases CPU usage but it is expected behaviour.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b019d5a587c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Recovery elastic’s index’s shard if it was broken]]></title>
            <link>https://catap.medium.com/recovery-elastics-index-s-shard-if-it-was-broken-e9497d56ccff?source=rss-15e1406c4812------2</link>
            <guid isPermaLink="false">https://medium.com/p/e9497d56ccff</guid>
            <category><![CDATA[elasticsearch]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[recovery]]></category>
            <dc:creator><![CDATA[Kirill A. Korinsky]]></dc:creator>
            <pubDate>Fri, 14 Dec 2018 12:17:13 GMT</pubDate>
            <atom:updated>2018-12-14T18:01:01.714Z</atom:updated>
            <content:encoded><![CDATA[<p>Sometime when you have your elastic you may have an issue when shard was broken.</p><p>You may have different root causes, for example:</p><ul><li>JVM was killed by OOM-killer for some reason;</li><li>hardware issue when you lose something on your disk;</li><li>power failure;</li><li>elastic bugs...</li></ul><p>Anyway, it may happen. And it will happen.</p><p>Good news is elastic very tolerant of this sort of issue and may self-fix. But it can’t if you haven’t got a replica of this shard.</p><p>You may increase the probability of this by setup <em>index.translog.durability</em> to <em>async </em>but in some cases it may increase write speed. I don’t think that you really need it, but if you need… ;)</p><p>Anyway, one day you will have red status and if you run <em>GET</em> <em>_cluster/allocation/explain </em>you can find that one of shard has an issue and the system hasn’t got another copy of this shard…</p><p>OK, that should you do?</p><p>You can run something likes:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/adafd79b1ab2de2822be06a5291ac38c/href">https://medium.com/media/adafd79b1ab2de2822be06a5291ac38c/href</a></iframe><p>after that, you will recreate this shard. Yes, you will have the green status again but lose your data. You can use <em>allocate_stale_primary</em> if some nodes leave cluster and it may contain missed shard.</p><p>But if you haven’t got a node that left the cluster and you had only one copy of shard and it was corrupted… you still have an option before lose your data.</p><p>At the explain you can find a path to the corrupted Lucene index. Something likes <em>SimpleFSDirectory@/var/lib/elasticsearch/some-node/nodes/0/indices/BYurcTitskeSexyYOBjiu1/66/index</em></p><p>If this folder contains a bit more than a few files a dozen bytes each you still have a chance. How?</p><p>Try to run:</p><p><em>sudo java -cp /usr/share/elasticsearch/lib/elasticsearch-*.jar:/usr/share/elasticsearch/lib/* org.apache.lucene.index.CheckIndex [path]</em></p><p>If it found any errors you can try to fix it. How? First of all shutdown the node on the machine. You can try to fix it on the fly, but ask elastic to reread corrupted index is really tricky and unsafe, so, I suggest to don’t do it and just stop it.</p><p>After you’ve stopped it re-run the same command but add <em>-exorcise</em> option after the path.</p><p>If it can fix it, it will. And if it fixed something you may start your node… and have a green status.</p><p>If it can’t? Well… You still may write some code to try to fix your specified case… But I suggest to copy broken index to some safe place, start everything back and remove this shard. Because you have a copy of the index, you can extract all survivors part and re-index it by hand.</p><p>If you think that your data is very important and you have no idea how to try to get it… You still can <a href="/service/mailto:kirill@korins.ky">drop me an email</a> and I can try to help ;)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e9497d56ccff" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>