<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Is it possible for inconsistent read in Hbase with Memcache and BlockCache? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-for-inconsistent-read-in-Hbase-with-Memcache/m-p/359469#M238126</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/40384"&gt;@smdas&lt;/a&gt;&amp;nbsp; Adding another scenario to picture. lets say a row key is already in blockcache. An update for that was just made. The row key has an existing value already in blockcache which is not the latest but&amp;nbsp; the updated value is in memstore and&amp;nbsp; if flushed then in Hfile. When a read occurs for the same row key then we look for the data first in blockcache and it will find a row key with old value. How does hbase know the value blockcache currently holds is not the latest and latest has to be fetched from Memstore or Hfile?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Dec 2022 05:34:36 GMT</pubDate>
    <dc:creator>pacman</dc:creator>
    <dc:date>2022-12-14T05:34:36Z</dc:date>
    <item>
      <title>Is it possible for inconsistent read in Hbase with Memcache and BlockCache?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-for-inconsistent-read-in-Hbase-with-Memcache/m-p/359120#M238025</link>
      <description>&lt;P&gt;Give a scenario that data is written to HFile in Hbase. Now a read occurs and result is saved in blockcache. For the data that is there is in block cache an update occurs, which is saved in Memstore.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now if the same data is read it will look for data first in Block Cache and if&amp;nbsp; cache is not yet expired the result is found there. If that data is returned to client then it would be an inconsistent read.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Is it possible for an above scenario to occur or is my understanding wrong?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 07:11:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-for-inconsistent-read-in-Hbase-with-Memcache/m-p/359120#M238025</guid>
      <dc:creator>pacman</dc:creator>
      <dc:date>2022-12-09T07:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible for inconsistent read in Hbase with Memcache and BlockCache?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-for-inconsistent-read-in-Hbase-with-Memcache/m-p/359249#M238058</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/84237"&gt;@pacman&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for using Cloudera Community. HBase handles such scenario by Read Merge. A Read "Merges" Key Values from the Block Cache, MemStore, and HFiles in the following steps:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;First, the Scanner looks for the Row Cells in theBlock Cache (Read Cache).&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Next, the Scanner looks in the MemStore (Write Cache).&lt;/LI&gt;&lt;LI&gt;If the Scanner does not find all of the Row Cells in the MemStore and Block Cache, then Hfiles are referred.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope the above answers your query. If Yes, Kindly mark the Post as Resolved.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards, Smarak&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 15:31:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-for-inconsistent-read-in-Hbase-with-Memcache/m-p/359249#M238058</guid>
      <dc:creator>smdas</dc:creator>
      <dc:date>2022-12-09T15:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible for inconsistent read in Hbase with Memcache and BlockCache?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-for-inconsistent-read-in-Hbase-with-Memcache/m-p/359313#M238076</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/40384"&gt;@smdas&lt;/a&gt;&amp;nbsp; So even if a key is updated in Memcache and not updated in Blockcache&amp;nbsp; the read merge updates the values of BlockCache with Memcache directly without updating HFile? Cause for HFile to be updated a flush has to happen right? Or is it that MemCache and BlockCache checks are done simultaneously?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Dec 2022 18:11:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-for-inconsistent-read-in-Hbase-with-Memcache/m-p/359313#M238076</guid>
      <dc:creator>pacman</dc:creator>
      <dc:date>2022-12-10T18:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible for inconsistent read in Hbase with Memcache and BlockCache?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-for-inconsistent-read-in-Hbase-with-Memcache/m-p/359452#M238123</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/84237"&gt;@pacman&lt;/a&gt;&amp;nbsp;HFile is only updated after flush of Memstore. In the scenario shared, Read Merge would share the Updated values without updating the Hfile.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We can perform the same by following for verification:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Create a Table with 1 CF. Insert 1 Row &amp;amp; flush Table to ensure 1 Hfile is created.&amp;nbsp;&lt;BR /&gt;2. Read the Table, which would read from Hfile &amp;amp; place in BlockCache. The BlockCache Size is visible via HBase UI at the CF family level within the Table's Level Statistics,&lt;BR /&gt;3. Read the Table again, which would read from BlockCache. Verify via Hit Ratio from the BlockCache Stats in HBase UI.&amp;nbsp;&lt;BR /&gt;4. Update the Row by using the same RowKey, yet using a different Value for the Column Qualifier within the Column Family.&amp;nbsp;&lt;BR /&gt;5. Read the Table again. You should get the Updated Value from Step 4.&amp;nbsp;&lt;BR /&gt;6. To make things interesting, Remove the concerned Table's 1 Region hosting RegionServer WAL file &amp;amp; Kill the RegionServer PID. This ensure the MemStore isn't flushed owing to Ungraceful exit &amp;amp; WAL can't be replayed.&amp;nbsp;&lt;BR /&gt;7. Start the RegionServer, which shall create the WAL file. Read the Table again. The same would show Value from Step 1.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This would help confirm the HFile isn't Updated when HBase Read Merge the Values from BlockCache &amp;amp; MemStore while reading the Table as per Step 5.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards, Smarak&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 15:40:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-for-inconsistent-read-in-Hbase-with-Memcache/m-p/359452#M238123</guid>
      <dc:creator>smdas</dc:creator>
      <dc:date>2022-12-13T15:40:32Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible for inconsistent read in Hbase with Memcache and BlockCache?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-for-inconsistent-read-in-Hbase-with-Memcache/m-p/359469#M238126</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/40384"&gt;@smdas&lt;/a&gt;&amp;nbsp; Adding another scenario to picture. lets say a row key is already in blockcache. An update for that was just made. The row key has an existing value already in blockcache which is not the latest but&amp;nbsp; the updated value is in memstore and&amp;nbsp; if flushed then in Hfile. When a read occurs for the same row key then we look for the data first in blockcache and it will find a row key with old value. How does hbase know the value blockcache currently holds is not the latest and latest has to be fetched from Memstore or Hfile?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Dec 2022 05:34:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-for-inconsistent-read-in-Hbase-with-Memcache/m-p/359469#M238126</guid>
      <dc:creator>pacman</dc:creator>
      <dc:date>2022-12-14T05:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible for inconsistent read in Hbase with Memcache and BlockCache?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-for-inconsistent-read-in-Hbase-with-Memcache/m-p/359769#M238207</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/84237"&gt;@pacman&lt;/a&gt;&amp;nbsp;A Merge happens for each Read Operation i.e. BlockCache &amp;amp; MemStore. As such, Incorrect Values aren't observed. Having said that, If you observe any such scenario of Read/Write Inconsistency, Kindly share a Use-Case &amp;amp; any replication attempt to allow us to review accordingly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards, Smarak&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 08:15:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Is-it-possible-for-inconsistent-read-in-Hbase-with-Memcache/m-p/359769#M238207</guid>
      <dc:creator>smdas</dc:creator>
      <dc:date>2022-12-19T08:15:18Z</dc:date>
    </item>
  </channel>
</rss>

