From commits-return-98692-archive-asf-public=cust-asf.ponee.io@hbase.apache.org Tue Jun 1 15:04:09 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-he-de.apache.org (mxout1-he-de.apache.org [95.216.194.37]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 20E57180636 for ; Tue, 1 Jun 2021 17:04:09 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-he-de.apache.org (ASF Mail Server at mxout1-he-de.apache.org) with SMTP id 76914611E0 for ; Tue, 1 Jun 2021 15:04:08 +0000 (UTC) Received: (qmail 5239 invoked by uid 500); 1 Jun 2021 15:04:07 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 5230 invoked by uid 99); 1 Jun 2021 15:04:07 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jun 2021 15:04:07 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 65CE881A86; Tue, 1 Jun 2021 15:04:07 +0000 (UTC) Date: Tue, 01 Jun 2021 15:04:04 +0000 To: "commits@hbase.apache.org" Subject: [hbase] branch master updated: HBASE-25932 addendum: Add test comments. (#3344) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <162255984219.20319.16742385680151674159@gitbox.apache.org> From: bharathv@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: hbase X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: b04c3c77860fe430308a6bfd7dd8aebe1ad3510c X-Git-Newrev: 4fb086121450bd5b4e4d604b21758c0b6dff88e4 X-Git-Rev: 4fb086121450bd5b4e4d604b21758c0b6dff88e4 X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. bharathv pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/hbase.git The following commit(s) were added to refs/heads/master by this push: new 4fb0861 HBASE-25932 addendum: Add test comments. (#3344) 4fb0861 is described below commit 4fb086121450bd5b4e4d604b21758c0b6dff88e4 Author: Bharath Vissapragada AuthorDate: Tue Jun 1 08:03:25 2021 -0700 HBASE-25932 addendum: Add test comments. (#3344) Signed-off-by Anoop Sam John --- .../hadoop/hbase/replication/regionserver/TestWALEntryStream.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestWALEntryStream.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestWALEntryStream.java index d4bdaaa..3442f98 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestWALEntryStream.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestWALEntryStream.java @@ -109,6 +109,13 @@ public class TestWALEntryStream { /** * Test helper that waits until a non-null entry is available in the stream next or times out. + * A {@link WALEntryStream} provides a streaming access to a queue of log files. Since the stream + * can be consumed as the file is being written, callers relying on {@link WALEntryStream#next()} + * may need to retry multiple times before an entry appended to the WAL is visible to the stream + * consumers. One such cause of delay is the close() of writer writing these log files. While the + * closure is in progress, the stream does not switch to the next log in the queue and next() may + * return null entries. This utility wraps these retries into a single next call and that makes + * the test code simpler. */ private static class WALEntryStreamWithRetries extends WALEntryStream { // Class member to be able to set a non-final from within a lambda.