SShortSingh.
Back to feed

How to Fix CRaC Restore Failures in Java Using JDK 26 JFR Events

0
·1 views

Project CRaC has become the standard for achieving fast startup times in cloud-native Java microservices, but improper checkpoint handling can cause silent restore failures in production. Common pitfalls include leaving database connection pools and open sockets active during a checkpoint, which triggers hard exceptions and aborts the freeze process. JDK 26 introduces native JFR events — jdk.Checkpoint and jdk.Restore — that allow developers to profile freeze duration and identify which resources blocked a restore operation. Developers must implement the org.crac.Resource interface with strictly idempotent beforeCheckpoint and afterRestore hooks to ensure safe recovery in cloned environments. A centralized resource coordinator should drain active HTTP requests and close all file descriptors before the checkpoint engine runs.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

JavaScript Event Loop and Concurrency Model Explained for Beginners

JavaScript is a single-threaded language, meaning it can execute only one piece of code at a time, yet it can still manage multiple asynchronous operations concurrently. This is made possible by the Event Loop, which monitors the Call Stack and moves callbacks from task queues into it for execution when the stack is empty. Asynchronous operations such as timers, API calls, and file reads are handled outside the JavaScript engine by browser Web APIs or Node.js APIs, with their callbacks queued upon completion. The Microtask Queue, which holds Promise callbacks, is always processed before the Macrotask Queue, which holds callbacks from functions like setTimeout. Together, these mechanisms form JavaScript's Concurrency Model, allowing multiple operations to progress simultaneously without true parallel execution.

0
ProgrammingDEV Community ·

Sumeh v3.0 offers unified data quality API across 14 engines with built-in row splitting

Sumeh is an open-source Python library designed to run data validation rules against datasets using a single, consistent API across 14 engines, including Pandas, PySpark, BigQuery, Snowflake, and DuckDB. Unlike platforms such as Great Expectations or Soda, Sumeh positions itself as a lightweight library focused solely on validation without requiring cloud services or proprietary configuration formats. A key feature is its ability to split validated data into clean and quarantine rows in a single scan, avoiding the double-pass overhead seen in competing tools. On distributed engines like PySpark, the row-level bifurcation is built entirely from lazy Column expressions, meaning data is never pulled to the driver — addressing a known memory risk in tools like Deequ. Version 3.0, released this month, builds on the v2.0 architectural rewrite and introduces new functionality while maintaining full backward compatibility for existing v2.x users.

0
ProgrammingDEV Community ·

Developer Tests Google's Open Knowledge Format on Real API Codebase, Results Surprise

A senior software engineer and tech lead converted the documentation directory of a project called order-api into a conformant Open Knowledge Format (OKF) v0.1 bundle to test whether the format genuinely improves AI agent performance. The experiment involved 25 documents spanning ADRs, evals, skills, runbooks, and reference files, each updated with YAML frontmatter and cross-linked related sections per OKF specification. Two separate AI agent sessions using Claude Code were then run against identical tasks — one using the original repo structure and one using the OKF bundle — to compare behavior. The conversion required only two structural changes per document: standardized metadata headers and a related-links section at the bottom. The engineer noted the outcome differed from expectations, though the full findings are detailed in the accompanying article.

0
ProgrammingDEV Community ·

Developer releases 23,000-record open Gujarati instruction dataset to improve AI language support

A developer has publicly released GGJI v1, a Gujarati-language instruction-tuning dataset containing 23,181 instruction-response pairs, citing a significant gap in AI support for the language despite it having over 60 million speakers. The dataset spans 18 task categories including reasoning, translation, creative writing, summarization, and culturally grounded content about Gujarat. It is designed to help researchers and developers fine-tune and benchmark language models capable of understanding and responding naturally in Gujarati. The dataset is freely available on Hugging Face under the Apache 2.0 license, permitting research, commercial, and personal use. The creator acknowledges it is a first version with known gaps, such as limited representation of dialects like Kathiawadi and Surti, and has invited community contributions for future improvements.

How to Fix CRaC Restore Failures in Java Using JDK 26 JFR Events · ShortSingh