Directory Oplock for Consistent Multi-Client Caching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current opportunistic locks (oplocks) are available for files but not directories, leading to stale cached directory content and data inconsistency when multiple clients access the same directory, as changes made by one client are not promptly notified to others, causing unnecessary refreshes and potential access failures.

Innovation Solution

Implementing a directory oplock system that allows clients to request and manage opportunistic locks on directories, using unique identifiers to determine if the lock should be broken, and notifying clients of changes to maintain data consistency by flushing updates and refreshing cached content.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of energy

If clients locally cache directory contents to reduce network traffic and access requests, then network efficiency is improved, but the cached directory contents become stale when other clients modify the directory

Engineering Contradiction:
Improvenetwork trafficVSAvoiddirectory content consistency
Core Design Contradiction:
Loss of energyVSLoss of information

Solution Approach 1:

The system implements a feedback mechanism where the file system monitors directory access requests from multiple clients. When a client modifies a directory, the system generates a notification and sends it to other clients that have cached copies of that directory. This feedback loop ensures that cached directory contents are updated promptly, maintaining information consistency while preserving the performance benefits of local caching.

Inventive Principle:
Principle #23Feedback

2Reliability

If opportunistic locks are implemented on files to notify clients of changes, then data consistency is improved, but directory access by multiple clients causes stale cached content

Engineering Contradiction:
Improvedata consistencyVSAvoiddirectory access capability
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent extends the opportunistic lock mechanism, which originally applied only to files, to directories as well. By making the lock mechanism universal across both files and directories, the system maintains data consistency for directory operations while preserving multi-client access capabilities. The same notification and cache invalidation logic that works for files is now applied to directories, providing consistent behavior across different object types.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Speed

If clients assume locally cached directory content is up-to-date, then access speed is improved, but unnecessary refreshes occur when changes are made by other clients

Engineering Contradiction:
Improvedirectory access speedVSAvoidcache refresh time
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The system performs preliminary actions by establishing opportunistic locks on directories before clients begin accessing them. When a client obtains an opportunistic lock on a directory, the system proactively monitors for access requests from other clients and prepares notification mechanisms in advance. This preliminary setup allows the system to immediately invalidate caches and notify clients when changes occur, eliminating the need for clients to periodically refresh their cached content and maintaining high access speed.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8965862B2Directory oplock
Publication Date: 2015.02.24 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8965862B2 patent drawing
  • US8965862B2 patent drawing
  • US8965862B2 patent drawing

AI summary

Current file systems may implement opportunistic locks on files that allow clients to locally cache file data, while promoting data consistency when multiple clients read/write the same file. Unfortunately, when a client locally caches directory content of a directory, the file system may lack a mechanism for notifying the client of changes to the directory that would render the cached directory content “stale”. Accordingly, one or more systems and/or techniques for managing a directory oplock are disclosed herein. A directory oplock may be generated based upon an oplock request comprising a first target key and a first parent key. Subsequent access requests for access to the directory or objects therein may be compared with the directory oplock to determine whether to break the directory oplock, and notify the client (e.g., directory oplock is broken if the client submitting the access request is different than the client owning the directory oplock).