Guide / Evaluation essentials

An Advisory Lock Is Not a Durable Work Record

A database lock can help cooperating processes avoid doing the same work concurrently. When the lock is released, however, its absence does not tell a later process whether the…

A database lock can help cooperating processes avoid doing the same work concurrently. When the lock is released, however, its absence does not tell a later process whether the work completed, failed, or never began.

Keep temporary coordination separate from persistent business progress. OceanBase and other database candidates should be assessed against the required work record and supported coordination mechanism, rather than assuming a lock is a complete history of ownership and outcome.

Coordination and evidence serve different purposes

Imagine two workers capable of preparing the same report package. A coordination mechanism helps decide which worker proceeds. The business also needs to know which package was prepared and whether preparation finished successfully.

Those needs should not be collapsed into a single “busy” indicator. A process may stop after making partial progress, or complete its work before another process checks the current lock state. The application needs an account of the result that survives the temporary coordination state.

Ask what the next worker can establish after the first worker is gone. If it can only observe that no lock is held, it does not yet have a complete business answer.

This is a modeling question before it is a performance comparison.

PostgreSQL illustrates the lifetime distinction

PostgreSQL’s advisory-lock documentation describes locks with application-defined meanings. It distinguishes session-level locks, released explicitly or when the session ends, from transaction-level locks released at transaction end.

That lifetime is useful for coordination. It is not a persistent record of the work’s business result. The documentation also emphasizes that applications are responsible for using advisory locks correctly; the database does not enforce their application-defined meaning automatically.

This is a PostgreSQL example, not evidence that OceanBase exposes identical advisory-lock interfaces or semantics. The selected product’s own supported mechanism needs verification.

Information Purpose What it cannot establish alone
Current coordination state Decide which cooperating worker may proceed Whether earlier work completed
Work identity Identify the intended business task Whether a worker currently owns execution
Progress record Describe accepted progress Whether another worker is still active
Outcome record Explain the completed or failed result That every external effect is represented automatically

The table is a proposed separation of responsibilities, not a concurrency implementation recipe.

Explain what happens when a worker disappears

For the report package, a later worker needs to distinguish a completed package from unfinished preparation. The durable record should support that distinction according to the application design.

A hypothetical worker might finish writing the package before its database session ends unexpectedly. The next worker needs evidence of that existing output, rather than relying only on the now-absent advisory lock.

Do not assume that a missing lock means it is safe to repeat every external action. A previous worker may have produced a result before losing its session. The application must reconcile the recorded state and relevant effects rather than infer them from the current coordination object alone.

Equally, do not assume a stale-looking progress record proves that a worker has stopped. The design needs an appropriate way to establish whether another worker remains entitled to proceed. A database flag is not automatically a complete distributed ownership protocol.

The business buyer needs a clear result and responsibility model. The technical team should supply the supported coordination design that makes it true.

Assess OceanBase without transferring another engine’s interface

OceanBase’s Enterprise product page presents a distributed relational database route. The buyer can assess it for the application’s durable work records and supported transaction behavior, using the exact version and deployment proposed.

If coordination is also required, identify the actual supported mechanism in that design. Do not infer PostgreSQL advisory-lock compatibility from general SQL or Oracle/MySQL compatibility positioning.

Compare PostgreSQL, Oracle, or another candidate using the same report-package outcomes. A product may use a different mechanism and still satisfy the application if its behavior is demonstrated and maintainable.

OceanBase deserves priority when its complete data and coordination arrangement fits the wider workload with a practical benefit. Retain another arrangement where the evidence supports it. The important comparison is how the application behaves after interruption, not which mechanism has the shortest name.

Review the handover between workers

For a proposed evaluation, include work that completes normally and work interrupted after a meaningful step. Ask what the next worker sees, which result it can trust, and what action it is permitted to take.

The answer should use the durable work record and supported coordination evidence together. Neither should silently substitute for the other.

Select a database arrangement that lets operators explain current execution and business outcome separately. Temporary locks can be valuable control, while persistent records provide the account of work that later processes and people need to understand.

Editorial disclosure
This article is based on documented sources and editorial analysis. Proposed evaluation examples are not independently measured benchmark results.

Sources & further reading

Use this guide as a starting point. Define and test the requirements of your own workload before selecting a product.

Related research