Feed aggregator

Show HN: I built a persistent LSM-Tree storage engine in Go from scratch

Hacker News - Thu, 02/26/2026 - 12:03am

GO-LSM: BUILDING A LOG-STRUCTURED MERGE-TREE ENGINE

INTRODUCTION:

I've always been curious about the internals of databases, so I decided to build my own Log-Structured Merge-Tree (LSM-Tree) engine in Go to understand the "magic" behind write-optimized storage.

Go-LSM is a persistent Key-Value engine that manages the full lifecycle of data from volatile RAM to immutable disk storage.

TECHNICAL HIGHLIGHTS:

1. THE DURABILITY LAYER (WAL)

To ensure zero data loss, I implemented an append-only Write-Ahead Log.

• Custom binary protocol: [Type][KeyLen][ValLen][Key][Value] • File.Sync() to force kernel flushes to physical hardware • Ensures absolute durability on system crashes 2. SKIPLIST MEMTABLE

Instead of a standard tree, I used a SkipList for the in-memory layer.

• Provides O(log n) search and insertion without the rebalancing complexity of Red-Black trees • Keeps keys lexicographically sorted for the eventual SSTable flush • Enables efficient memory-to-disk transitions 3. SSTABLE FOOTER-BASED INDEXING

My SSTables are binary-searchable on disk using a tail-first reading strategy:

• Jump to the last 8 bytes of a file to find the Index Block pointer • Avoid full file scans by reading directly to the index • Execute binary search on sorted keys for O(log n) disk lookups 4. MAINTENANCE LAYER: COMPACTION

Built a K-Way Merge compaction engine that handles performance optimization:

• Processes multiple SSTable layers and merges them into single, optimized files • Handles "Read Amplification" by reducing the number of files to check per query • Processes "Tombstones" to finalize deletions and reclaim disk space 5. TOOLING & DEBUGGING

Custom binary parsers transform raw binary files into human-readable tables:

• lsm-dump: View sorted SSTable contents • lsm-wal-dump: Inspect unflushed Write-Ahead Log entries • Enables deep inspection of internal storage layers KEY ENGINEERING LESSONS:

Moving from standard application development to systems programming required a fundamental shift in how I think about memory and I/O:

• ENDIANNESS LOGIC: Handling Big-Endian vs. Little-Endian conversions for cross-platform compatibility • FILE OFFSET MANAGEMENT: Manually managing byte offsets and file pointer positioning • CONCURRENCY & THREAD SAFETY: Implementing thread-safe mechanisms for MemTable flushing • BINARY PROTOCOL DESIGN: Creating efficient, compact data encodings for durability REPOSITORY:

https://github.com/Jyotishmoy12/LSM-Tree-in-Golang

Comments URL: https://news.ycombinator.com/item?id=47162087

Points: 1

# Comments: 0

Categories: Hacker News

Human brain cells playing Doom

Hacker News - Thu, 02/26/2026 - 12:01am
Categories: Hacker News

Cisco Catalyst SD-WAN Vulnerabilities

Cisco Security Advisories - Thu, 02/26/2026 - 12:00am

Multiple vulnerabilities in Cisco Catalyst SD-WAN Manager, formerly SD-WAN vManage, could allow an attacker to access an affected system, elevate privileges to root, gain access to sensitive information, and overwrite arbitrary files.

For more information about these vulnerabilities, see the Details section of this advisory.

Cisco has released software updates that address these vulnerabilities. There are no workarounds that address these vulnerabilities.

This advisory is available at the following link:
https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-sdwan-authbp-qwCX8D4v

<br/>Security Impact Rating: Critical <br/>CVE: CVE-2026-20122,CVE-2026-20126,CVE-2026-20128,CVE-2026-20129,CVE-2026-20133
Categories: Cisco

Cisco FXOS and UCS Manager Software Command Injection Vulnerability

Cisco Security Advisories - Thu, 02/26/2026 - 12:00am

A vulnerability in the web-based management interface of Cisco FXOS Software and Cisco UCS Manager Software could allow an authenticated, local attacker with administrative privileges to perform command injection attacks on an affected system and elevate privileges to root

This vulnerability is due to insufficient input validation of command arguments supplied by the user. An attacker could exploit this vulnerability by authenticating to a device and submitting crafted input to the affected command. A successful exploit could allow the attacker to execute arbitrary commands on the underlying operating system of the affected device with root-level privileges.

Cisco has released software updates that address this vulnerability. There are no workarounds that address this vulnerability.

This advisory is available at the following link:
https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-ucsciv-wGYtC78q

This advisory is part of the February 2026 Cisco FXOS and NX-OS Software Security Advisory Bundled Publication. For a complete list of the advisories and links to them, see Cisco Event Response: February 2026 Semiannual Cisco FXOS and NX-OS Software Security Advisory Bundled Publication.

<br/>Security Impact Rating: Medium <br/>CVE: CVE-2026-20099
Categories: Cisco

Cisco Application Policy Infrastructure Controller Denial of Service Vulnerability

Cisco Security Advisories - Thu, 02/26/2026 - 12:00am

A vulnerability in the Object Model CLI component of Cisco Application Policy Infrastructure Controller (APIC) could allow an authenticated, local attacker to cause an affected device to reload unexpectedly, resulting in a denial of service (DoS) condition. To exploit this vulnerability, the attacker must have valid user credentials and any role that includes CLI access.

This vulnerability is due to insufficient input validation. An attacker could exploit this vulnerability by issuing crafted commands at the CLI prompt. A successful exploit could allow the attacker to cause the device to reload, resulting in a DoS condition.

Cisco has released software updates that address this vulnerability. There are no workarounds that address this vulnerability.

This advisory is available at the following link:
https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-apic-dos-rNus8EFw

<br/>Security Impact Rating: Medium <br/>CVE: CVE-2026-20107
Categories: Cisco

Cisco NX-OS Software Link Layer Discovery Protocol Denial of Service Vulnerability

Cisco Security Advisories - Thu, 02/26/2026 - 12:00am

A vulnerability in the Link Layer Discovery Protocol (LLDP) feature of Cisco NX-OS Software could allow an unauthenticated, adjacent attacker to cause the LLDP process to restart, which could cause an affected device to reload unexpectedly.

This vulnerability is due to improper handling of specific fields in an LLDP frame. An attacker could exploit this vulnerability by sending a crafted LLDP packet to an interface of an affected device. A successful exploit could allow the attacker to cause the device to reload, resulting in a denial of service (DoS) condition.

Note: LLDP is a Layer 2 link protocol. To exploit this vulnerability, an attacker would need to be directly connected to an interface of an affected device, either physically or logically (for example, through a Layer 2 Tunnel configured to transport the LLDP protocol).

Cisco has released software updates that address this vulnerability. There are no workarounds that address this vulnerability.

This advisory is available at the following link:
https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-n3kn9k_aci_lldp_dos-NdgRrrA3

This advisory is part of the February 2026 Cisco FXOS and NX-OS Software Security Advisory Bundled Publication. For a complete list of the advisories and links to them, see Cisco Event Response: February 2026 Semiannual Cisco FXOS and NX-OS Software Security Advisory Bundled Publication.

<br/>Security Impact Rating: High <br/>CVE: CVE-2026-20010
Categories: Cisco

Cisco Nexus 9000 Series Fabric Switches in ACI Mode Denial of Service Vulnerability

Cisco Security Advisories - Thu, 02/26/2026 - 12:00am

A vulnerability in Cisco Nexus 9000 Series Fabric Switches in ACI mode could allow an unauthenticated, adjacent attacker to cause a denial of service (DoS) condition on an affected device.

This vulnerability is due to insufficient validation when processing specific Ethernet frames. An attacker could exploit this vulnerability by sending a crafted Ethernet frame to the management interface of an affected device. A successful exploit could allow the attacker to cause the device to reload unexpectedly, resulting in a DoS condition.

Note: Only the out-of-band (OOB) management interface is affected.

Cisco has released software updates that address this vulnerability. There are no workarounds that address this vulnerability.

This advisory is available at the following link:
https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-nxos-cpdos-qLsv6pFD

This advisory is part of the February 2026 Cisco FXOS and NX-OS Software Security Advisory Bundled Publication. For a complete list of the advisories and links to them, see Cisco Event Response: February 2026 Semiannual Cisco FXOS and NX-OS Software Security Advisory Bundled Publication.

<br/>Security Impact Rating: High <br/>CVE: CVE-2026-20033
Categories: Cisco

Cisco Nexus 9000 Series Fabric Switches in ACI Mode SNMP Denial of Service Vulnerability

Cisco Security Advisories - Thu, 02/26/2026 - 12:00am

A vulnerability in the Simple Network Management Protocol (SNMP) subsystem of Cisco Nexus 9000 Series Fabric Switches in ACI mode could allow an authenticated, remote attacker to cause a denial of service (DoS) condition on an affected device.

This vulnerability is due to improper processing when parsing SNMP requests. An attacker could exploit this vulnerability by continuously sending SNMP queries to a specific MIB of an affected device. A successful exploit could allow the attacker to cause a kernel panic on the device, resulting in a reload and a DoS condition.

Note: This vulnerability affects SNMP versions 1, 2c, and 3. To exploit this vulnerability through SNMPv1 or SNMPv2c, the attacker must have a valid read-only SNMP community string for the affected system. To exploit this vulnerability through SNMPv3, the attacker must have valid SNMP user credentials for the affected system.

Cisco has released software updates that address this vulnerability. There are workarounds that address this vulnerability.

This advisory is available at the following link:
https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-nxos-dsnmp-cNN39Uh

This advisory is part of the February 2026 Cisco FXOS and NX-OS Software Security Advisory Bundled Publication. For a complete list of the advisories and links to them, see Cisco Event Response: February 2026 Semiannual Cisco FXOS and NX-OS Software Security Advisory Bundled Publication.

<br/>Security Impact Rating: High <br/>CVE: CVE-2026-20048
Categories: Cisco

Cisco Nexus 3600 and 9500-R Series Switching Platforms Layer 2 Loop Denial of Service Vulnerability

Cisco Security Advisories - Thu, 02/26/2026 - 12:00am

A vulnerability with the Ethernet VPN (EVPN) Layer 2 ingress packet processing of Cisco Nexus 3600 Platform Switches and Cisco Nexus 9500-R Series Switching Platforms could allow an unauthenticated, adjacent attacker to trigger a Layer 2 traffic loop.

This vulnerability is due to a logic error when processing a crafted Layer 2 ingress frame. An attacker could exploit this vulnerability by sending a stream of crafted Ethernet frames through the targeted device. A successful exploit could allow the attacker to cause a Layer 2 Virtual eXtensible LAN (VxLAN) traffic loop, which, in turn, could result in a denial of service (DoS) condition. This Layer 2 loop could oversubscribe the bandwidth on network interfaces, which would result in all data plane traffic being dropped. To exploit this vulnerability, the attacker must be Layer 2-adjacent to the affected device.

Note: To stop active exploitation of this vulnerability, manual intervention is required to both stop the crafted traffic and flap all involved network interfaces. For additional assistance if a Layer 2 loop that is related to this vulnerability is suspected, contact the Cisco Technical Assistance Center (TAC) or the proper support provider. 

Cisco has released software updates that address this vulnerability. There are no workarounds that address this vulnerability.

This advisory is available at the following link:
https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-nxos-ether-dos-Kv8YNWZ4

This advisory is part of the February 2026 Cisco FXOS and NX-OS Software Security Advisory Bundled Publication. For a complete list of the advisories and links to them, see Cisco Event Response: February 2026 Semiannual Cisco FXOS and NX-OS Software Security Advisory Bundled Publication.

<br/>Security Impact Rating: High <br/>CVE: CVE-2026-20051
Categories: Cisco

Cisco FXOS and UCS Manager Software Stored Cross-Site Scripting Vulnerability

Cisco Security Advisories - Thu, 02/26/2026 - 12:00am

A vulnerability in the web-based management interface of Cisco FXOS Software and Cisco UCS Manager Software could allow an authenticated, remote attacker to conduct a stored cross-site scripting (XSS) attack against a user of the interface.

This vulnerability is due to insufficient validation of user-supplied input by the web-based management interface of an affected system. An attacker could exploit this vulnerability by injecting malicious data into specific pages of the interface. A successful exploit could allow the attacker to execute arbitrary script code in the context of the affected interface or access sensitive, browser-based information. To exploit this vulnerability, the attacker must have valid credentials for a user account with the role of Administrator or AAA Administrator

Cisco has released software updates that address this vulnerability. There are no workarounds that address this vulnerability.

This advisory is available at the following link:
https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-ucsfxosxss-7skVE8Zv

This advisory is part of the February 2026 Cisco FXOS and NX-OS Software Security Advisory Bundled Publication. For a complete list of the advisories and links to them, see Cisco Event Response: February 2026 Semiannual Cisco FXOS and NX-OS Software Security Advisory Bundled Publication.

<br/>Security Impact Rating: Medium <br/>CVE: CVE-2026-20091
Categories: Cisco

Cisco UCS Manager Software Privilege Escalation Vulnerability

Cisco Security Advisories - Thu, 02/26/2026 - 12:00am
A vulnerability in the NX-OS CLI privilege levels of Cisco UCS Manager Software could allow an authenticated, local attacker with read-only privileges to modify files and perform unauthorized actions on an affected system.   This vulnerability exists because unnecessary privileges are given to the user. An attacker could exploit this vulnerability by authenticating to a device as a read-only user and connecting to the NX-OS CLI. A successful exploit could allow the attacker to create or overwrite files in the file system or perform limited privileged actions on an affected device.   

Cisco has released software updates that address this vulnerability. There are no workarounds that address this vulnerability. 

This advisory is available at the following link:
https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-ucsm-afwae-mOgUfyLn

This advisory is part of the February 2026 Cisco FXOS and NX-OS Software Security Advisory Bundled Publication. For a complete list of the advisories and links to them, see Cisco Event Response: February 2026 Semiannual Cisco FXOS and NX-OS Software Security Advisory Bundled Publication.

<br/>Security Impact Rating: Medium <br/>CVE: CVE-2026-20037
Categories: Cisco

Cisco UCS Manager Software Command Injection Vulnerability

Cisco Security Advisories - Thu, 02/26/2026 - 12:00am
A vulnerability in the CLI and web-based management interface of Cisco UCS Manager Software could allow an authenticated, remote attacker with valid administrative privileges to execute arbitrary commands on the underlying operating system of an affected device.    This vulnerability is due to insufficient input validation of command arguments that are supplied by the user. An attacker could exploit this vulnerability by authenticating to a device and submitting crafted input to the affected command. A successful exploit could allow the attacker to execute arbitrary commands on the underlying operating system of an affected device with root-level privileges.

Cisco has released software updates that address this vulnerability. There are no workarounds that address this vulnerability.

This advisory is available at the following link:
https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-ucsm-cmdinj-GvxLPeSB

This advisory is part of the February 2026 Cisco FXOS and NX-OS Software Security Advisory Bundled Publication. For a complete list of the advisories and links to them, see Cisco Event Response: February 2026 Semiannual Cisco FXOS and NX-OS Software Security Advisory Bundled Publication.

<br/>Security Impact Rating: Medium <br/>CVE: CVE-2026-20036
Categories: Cisco

Show HN: AI-assert – Constraint verification for LLM outputs (278 lines, Python)

Hacker News - Wed, 02/25/2026 - 11:53pm

I built a tiny library that verifies LLM outputs against constraints and retries on failure.

The core insight: LLMs don't reliably follow instructions, but you can catch failures cheaply and retry with targeted feedback. This is essentially a lightweight "process reward model" that requires zero training.

How it works: 1. Your LLM generates output 2. ai-assert checks it against constraints (length, word count, sentence count, regex, custom predicates) 3. Each constraint returns a score in [0,1] -- composite is multiplicative (zero in any = zero overall) 4. If score < threshold, retry with feedback ("Constraint X failed because Y -- regenerate") 5. Return the best-scoring attempt

On IFEval (25 instruction-following constraint types): 69.3% -> 76.2% accuracy.

278 lines. Zero dependencies. Works with any callable that takes a string and returns a string.

pip install ai-assert

https://github.com/kaantahti/ai-assert

Comments URL: https://news.ycombinator.com/item?id=47162028

Points: 1

# Comments: 0

Categories: Hacker News

Pages