Log Record Duplicate Handling via Resend Parameter Check

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In log structured storage systems, when a command to add a record to a log fails and is resent without acknowledgment, it can result in duplicate entries, leading to incorrect states during crash recovery and potential data re-appearance issues due to incomplete garbage collection.

Innovation Solution

The system resends the command with a 'resend parameter' to check if the record already exists in the log, and if so, returns the existing log address without adding a duplicate, preventing duplicate log entries.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a command to add a record to a log is resent without checking for duplicates, then the system ensures the record exists in the log, but duplicate entries are created leading to incorrect states during crash recovery

Engineering Contradiction:
Improvedata integrityVSAvoidduplicate log entries
Core Design Contradiction:
ReliabilityVSObject-generated harmful factors

Solution Approach 1:

The system performs a preliminary search in the log to check if the record with the given key already exists before adding a new record. This preliminary action prevents duplicate entries from being created in the first place, resolving the contradiction between ensuring reliability and avoiding harmful duplicate entries.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system implements a feedback mechanism where the log is scanned to detect if a record with the same key already exists. Based on this feedback, the system decides whether to add a new record or return the existing log address, thereby preventing duplicate entries while maintaining data integrity.

Inventive Principle:
Principle #23Feedback

2Object-generated harmful factors

If the log is scanned to check for existing records before adding, then duplicate entries are prevented, but the time and computational resources required to process the command increase

Engineering Contradiction:
Improveduplicate log entriesVSAvoidcommand processing time
Core Design Contradiction:
Object-generated harmful factorsVSLoss of time

Solution Approach 1:

Instead of scanning the entire log, the system performs a targeted search using the key to locate existing records. This partial action approach finds the needed information more quickly than a full scan would, reducing the time penalty while still preventing duplicate entries.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS9971539B2Handling failure of a command to add a record to a log
Publication Date: 2018.05.15 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US9971539B2 patent drawing
  • US9971539B2 patent drawing
  • US9971539B2 patent drawing

AI summary

Provided are a computer program product, system, and method for handling failure of a command to add a record to a log. The log has records at log addresses. A command is received to add a record to the log indicating a current log address at which the record is stored in the log. A determination is made as to whether the command has a resend parameter set, wherein the resend parameter indicates whether the command is being resent to add the record. A determination is made as to whether there is a log address in the log having the record following the current log address in response to determining that the resend parameter indicates that the command is being resent. The determined log address in the log is returned.