<?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 Sravani isha on Medium]]></title>
        <description><![CDATA[Stories by Sravani isha on Medium]]></description>
        <link>https://medium.com/@sravani.isha?source=rss-1128620caadb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*t9IrXZQYB22XeKYq</url>
            <title>Stories by Sravani isha on Medium</title>
            <link>https://medium.com/@sravani.isha?source=rss-1128620caadb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 11:38:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sravani.isha/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[GitHub SSH Setup and Clone Repository (New Machine)]]></title>
            <link>https://medium.com/@sravani.isha/github-ssh-setup-and-clone-repository-new-machine-b3ef7ab67d24?source=rss-1128620caadb------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3ef7ab67d24</guid>
            <category><![CDATA[ssh]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Sravani isha]]></dc:creator>
            <pubDate>Thu, 16 Jul 2026 10:32:10 GMT</pubDate>
            <atom:updated>2026-07-16T10:34:17.668Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>SSH GitHub setup command list</strong> for beginners</p><h3>1. Check Git and SSH installation</h3><pre>git --version<br>ssh -V</pre><h3>2. Check existing SSH keys</h3><pre>ls -la ~/.ssh</pre><p>Look for existing keys:</p><pre>id_ed25519<br>id_ed25519.pub<br>id_rsa<br>id_rsa.pub</pre><h3>3. Generate a new SSH key</h3><h3>Option A: RSA key (4096-bit)</h3><pre>ssh-keygen -t rsa -b 4096 -C &quot;your_email@example.com&quot;</pre><h3>Option B: Ed25519 key (recommended for new setups)</h3><pre>ssh-keygen -t ed25519 -C &quot;your_email@example.com&quot;</pre><p>Press <strong>Enter</strong> to save in the default location:</p><pre>~/.ssh/id_rsa</pre><p>or:</p><pre>~/.ssh/id_ed25519</pre><h3>4. Start SSH agent</h3><pre>eval &quot;$(ssh-agent -s)&quot;</pre><h3>5. Add SSH private key to agent</h3><p>For RSA:</p><pre>ssh-add ~/.ssh/id_rsa</pre><p>For Ed25519:</p><pre>ssh-add ~/.ssh/id_ed25519</pre><p>Verify:</p><pre>ssh-add -l</pre><h3>6. Copy the public key</h3><p>For RSA:</p><pre>cat ~/.ssh/id_rsa.pub</pre><p>For Ed25519:</p><pre>cat ~/.ssh/id_ed25519.pub</pre><p>Copy the complete output.</p><p>Example:</p><pre>ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQ... your_email@example.com</pre><h3>7. Add SSH key to GitHub</h3><p>Go to:</p><pre>GitHub → Settings → SSH and GPG keys → New SSH key</pre><p>Paste the copied public key and save.</p><h3>8. Configure SSH (optional but recommended)</h3><p>Open SSH config:</p><pre>nano ~/.ssh/config</pre><p>Add:</p><pre>Host github.com<br>    HostName github.com<br>    User git<br>    IdentityFile ~/.ssh/id_rsa<br>    IdentitiesOnly yes</pre><p>For Ed25519:</p><pre>Host github.com<br>    HostName github.com<br>    User git<br>    IdentityFile ~/.ssh/id_ed25519<br>    IdentitiesOnly yes</pre><p>Save and exit.</p><h3>9. Test GitHub SSH connection</h3><pre>ssh -T git@github.com</pre><p>First time, you may see:</p><pre>The authenticity of host &#39;github.com&#39; can&#39;t be established.</pre><p>Type:</p><pre>yes</pre><p>Expected result:</p><pre>Hi &lt;github-username&gt;! You&#39;ve successfully authenticated, but GitHub does not provide shell access.</pre><h3>10. Get repository SSH URL</h3><p>From GitHub:</p><pre>Repository → Code → SSH → Copy</pre><p>Example:</p><pre>git@github.com:organization/project.git</pre><h3>11. Clone repository</h3><pre>git clone git@github.com:OWNER/REPOSITORY.git</pre><p>Example:</p><pre>git clone git@github.com:company/my-service.git</pre><h3>12. Enter repository</h3><pre>cd REPOSITORY</pre><p>Example:</p><pre>cd my-service</pre><h3>13. Verify remote URL</h3><pre>git remote -v</pre><p>Expected:</p><pre>origin  git@github.com:company/my-service.git (fetch)<br>origin  git@github.com:company/my-service.git (push)</pre><h3>14. Check current branch</h3><pre>git branch</pre><p>or:</p><pre>git branch -a</pre><h3>15. Pull latest changes</h3><pre>git pull origin main</pre><p>(or your branch name)</p><h3>Troubleshooting Commands</h3><h3>Check SSH authentication details</h3><pre>ssh -vT git@github.com</pre><p>Look for:</p><pre>Offering public key: ~/.ssh/id_rsa</pre><h3>List SSH keys loaded</h3><pre>ssh-add -l</pre><h3>Remove all loaded keys</h3><pre>ssh-add -D</pre><h3>Add key again</h3><pre>ssh-add ~/.ssh/id_rsa</pre><h3>Check SSH configuration</h3><pre>cat ~/.ssh/config</pre><h3>Check Git configuration</h3><pre>git config --list</pre><h3>Complete flow summary</h3><pre>Install Git<br>      ↓<br>Generate SSH key<br>      ↓<br>Start ssh-agent<br>      ↓<br>Add private key<br>      ↓<br>Copy public key<br>      ↓<br>Add key to GitHub<br>      ↓<br>Configure ~/.ssh/config<br>      ↓<br>Test ssh -T git@github.com<br>      ↓<br>Clone repository using SSH URL<br>      ↓<br>Verify git remote -v</pre><p>This should be a good internal setup document/runbook for a new developer machine.</p><h3>Delete Existing SSH Keys (Optional)</h3><blockquote><em>Use this only if you want to remove old SSH keys and create a fresh key pair.</em></blockquote><h3>1. Check existing SSH keys</h3><pre>ls -la ~/.ssh</pre><p>Example output:</p><pre>id_rsa<br>id_rsa.pub<br>id_ed25519<br>id_ed25519.pub<br>known_hosts<br>config</pre><h3>2. Remove specific SSH keys</h3><h3>Delete RSA key</h3><pre>rm ~/.ssh/id_rsa<br>rm ~/.ssh/id_rsa.pub</pre><h3>Delete Ed25519 key</h3><pre>rm ~/.ssh/id_ed25519<br>rm ~/.ssh/id_ed25519.pub</pre><h3>3. Remove all SSH keys from SSH agent</h3><p>Check loaded keys:</p><pre>ssh-add -l</pre><p>Remove all loaded keys:</p><pre>ssh-add -D</pre><p>Verify:</p><pre>ssh-add -l</pre><p>Expected:</p><pre>The agent has no identities.</pre><h3>4. Remove GitHub entry from known_hosts (optional)</h3><p>If you want to remove the saved GitHub server fingerprint:</p><pre>ssh-keygen -R github.com</pre><p>This removes the GitHub entry from:</p><pre>~/.ssh/known_hosts</pre><p>Next time you connect:</p><pre>ssh -T git@github.com</pre><p>SSH will ask you to verify GitHub’s host fingerprint again.</p><h3>5. Remove SSH configuration (optional)</h3><p>Check current SSH config:</p><pre>cat ~/.ssh/config</pre><p>Edit:</p><pre>nano ~/.ssh/config</pre><p>Remove the GitHub section:</p><pre>Host github.com<br>    HostName github.com<br>    User git<br>    IdentityFile ~/.ssh/id_rsa<br>    IdentitiesOnly yes</pre><p>Save and exit.</p><h3>6. Remove old SSH key from GitHub</h3><p>On GitHub:</p><pre>GitHub → Settings → SSH and GPG keys</pre><p>Delete the old key entry.</p><h3>7. Verify cleanup</h3><pre>ls -la ~/.ssh</pre><p>A clean directory may contain only:</p><pre>config<br>known_hosts</pre><p>(or nothing except the directory itself).</p><h3>8. Create a new key after cleanup</h3><p>Example with RSA:</p><pre>ssh-keygen -t rsa -b 4096 -C &quot;your_email@example.com&quot;</pre><p>or Ed25519:</p><pre>ssh-keygen -t ed25519 -C &quot;your_email@example.com&quot;</pre><p>Then continue with:</p><pre>eval &quot;$(ssh-agent -s)&quot;<br>ssh-add ~/.ssh/id_rsa<br>ssh -T git@github.com</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b3ef7ab67d24" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Async Anti-Pattern That Caused TaskRejectedException]]></title>
            <link>https://medium.com/@sravani.isha/the-async-anti-pattern-that-caused-taskrejectedexception-f85f355b1921?source=rss-1128620caadb------2</link>
            <guid isPermaLink="false">https://medium.com/p/f85f355b1921</guid>
            <category><![CDATA[cronjob-scheduler]]></category>
            <category><![CDATA[multithreading]]></category>
            <category><![CDATA[threadpoolexecutor]]></category>
            <category><![CDATA[spring-boot]]></category>
            <category><![CDATA[async]]></category>
            <dc:creator><![CDATA[Sravani isha]]></dc:creator>
            <pubDate>Thu, 12 Mar 2026 05:01:54 GMT</pubDate>
            <atom:updated>2026-03-12T05:01:54.410Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*famDnJvdjcBTr4gl91e5zA.png" /></figure><p>By <a href="https://medium.com/u/8d80de42dd88">Harshavardhan Katkam</a> and <a href="https://medium.com/u/1128620caadb">Sravani isha</a></p><p>In distributed systems, asynchronous processing is commonly used to improve throughput and responsiveness. However, <strong>misusing async patterns can silently introduce concurrency explosions</strong> that only appear under load.</p><p>Recently, we faced a production-like issue in our QA environment where our processing pipeline started throwing:</p><p>TaskRejectedException: Executor [ThreadPoolExecutor] did not accept task</p><h3>At first glance, everything looked correct:</h3><ul><li>Proper batching</li><li>Configured thread pool</li><li>Controlled executor</li></ul><p>But the real issue was deeper: <strong>nested asynchronous execution.</strong></p><h3>System Overview</h3><p>The system consists of two logical components:</p><ol><li><strong>Event Producer:</strong> A scheduled job scans records and triggers processing events.</li><li><strong>Processing Service:</strong> Receives requests and executes tasks in batches.</li></ol><p>To handle large datasets efficiently, batching was implemented to prevent overwhelming the system with single-record updates.</p><h3>Executor Configuration</h3><p>The processing service used a ThreadPoolTaskExecutor configured as follows:</p><pre>public Executor getAsyncExecutor() {<br>    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();<br>    executor.setCorePoolSize(10);<br>    executor.setMaxPoolSize(30);<br>    executor.setQueueCapacity(100);<br>    executor.setKeepAliveSeconds(30);<br>    executor.setThreadNamePrefix(&quot;async-worker-&quot;);<br>    executor.initialize();<br>    return executor;<br>}</pre><p><strong>The executor capacity breakdown:</strong></p><p><strong>ComponentCapacity: Core Threads -&gt; </strong>10, <strong>Max Threads -&gt; </strong>30, <strong>Queue -&gt; </strong>100</p><p><strong>Total capacity:</strong> 30 running tasks + 100 queued tasks = <strong>130 tasks.</strong></p><p>If more tasks arrive when both the pool and queue are full, the TaskRejectedException is thrown.</p><h3>Root Cause: Nested Async</h3><p>The problem stemmed from <strong>two layers of concurrency</strong> competing for resources.</p><h3>Layer 1: Async Invocation in the Scheduler</h3><p>The event dispatch method was being triggered asynchronously using Spring’s @Async annotation:</p><pre>@Async<br>public void triggerBulkTasks(...)</pre><p>This meant multiple scheduler threads could invoke the processing service concurrently.</p><h3>Layer 2: Executor in the Processing Service</h3><p>Once the request arrived, the processing service created multiple executor tasks:</p><pre>private void processTasks(List&lt;ProcessingTask&gt; tasks) {<br>    partitionTasks(tasks).forEach(batch -&gt;<br>            taskExecutor.execute(() -&gt; processBatch(batch))<br>    );<br>}</pre><h3>Thread Explosion Visualisation</h3><p>This is where the system started breaking. Let’s compare a healthy system vs. our nested scenario.</p><h3>1. Normal Controlled Concurrency</h3><p>In a healthy system, there is <strong>one async boundary</strong>. Concurrency is fully controlled by the executor.</p><ul><li><strong>Consumer Thread</strong> → Process Request → Submit Tasks → <strong>Worker Pool</strong></li></ul><h3>2. What Happened With Nested Async</h3><p>Because of @Async, every request created a <strong>new thread</strong> before even reaching the executor. Now imagine 10 requests arriving quickly. Instead of one thread managing the flow, the system suddenly had 10 Async Threads, each trying to flood the executor.</p><p><strong>The Math of Failure:</strong></p><p>If each request creates 10 batch tasks:</p><ul><li>10 async threads × 10 tasks = <strong>100 executor tasks created instantly.</strong></li></ul><p>When the 11th or 12th request arrived, the queue (100) and the max threads (30) were already saturated. <strong>Result: TaskRejectedException.</strong></p><h3>The Fix</h3><h3>1. Remove the Outer @Async Layer</h3><p>The async layer before the executor was removed. By making the notification trigger synchronous, we ensured only one component controlled the concurrency.</p><h3>2. Add CallerRunsPolicy</h3><p>We updated the executor to handle overload safely:</p><pre>executor.setRejectedExecutionHandler(<br>    new ThreadPoolExecutor.CallerRunsPolicy()<br>);</pre><p><strong>How CallerRunsPolicy saves the day:</strong></p><p>If the executor is full, instead of crashing with an exception, the <strong>caller thread</strong> (the one trying to submit the task) executes the task itself. This forces the producer to slow down, creating “natural backpressure.”</p><h3>Key Lessons for Resilient Backends</h3><ul><li><strong>Avoid Nested Async:</strong> Multiple async layers multiply concurrency unpredictably. Stick to <strong>one async boundary</strong> per pipeline.</li><li><strong>Always Use Bounded Queues:</strong> Unbounded queues are a recipe for OutOfMemory errors.</li><li><strong>Choose a Safe Rejection Policy:</strong> CallerRunsPolicy ensures tasks are not lost during bursts.</li><li><strong>Throughput Must Match Capacity:</strong> A fundamental rule: Input Rate ≤ Processing Rate.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f85f355b1921" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>