@@ -190,8 +190,11 @@ public void testRegionServerLastLogRollResults() throws IOException {
190190 String [] servers = new String [] { "server1" , "server2" , "server3" };
191191 Long [] timestamps = new Long [] { 100L , 102L , 107L };
192192
193+ // validate the prefix scan in readRegionServerlastLogRollResult will get the right timestamps
194+ // when a backup root with the same prefix is present
193195 for (int i = 0 ; i < servers .length ; i ++) {
194196 table .writeRegionServerLastLogRollResult (servers [i ], timestamps [i ], "root" );
197+ table .writeRegionServerLastLogRollResult (servers [i ], timestamps [i ], "root/backup" );
195198 }
196199
197200 HashMap <String , Long > result = table .readRegionServerLastLogRollResult ("root" );
@@ -265,7 +268,10 @@ public void testRegionServerLogTimestampMap() throws IOException {
265268 rsTimestampMap .put ("rs2:100" , 101L );
266269 rsTimestampMap .put ("rs3:100" , 103L );
267270
271+ // validate the prefix scan in readLogTimestampMap will get the right timestamps
272+ // when a backup root with the same prefix is present
268273 table .writeRegionServerLogTimestamp (tables , rsTimestampMap , "root" );
274+ table .writeRegionServerLogTimestamp (tables , rsTimestampMap , "root/backup" );
269275
270276 Map <TableName , Map <String , Long >> result = table .readLogTimestampMap ("root" );
271277
@@ -291,7 +297,10 @@ public void testRegionServerLogTimestampMap() throws IOException {
291297 rsTimestampMap1 .put ("rs2:100" , 201L );
292298 rsTimestampMap1 .put ("rs3:100" , 203L );
293299
300+ // validate the prefix scan in readLogTimestampMap will get the right timestamps
301+ // when a backup root with the same prefix is present
294302 table .writeRegionServerLogTimestamp (tables1 , rsTimestampMap1 , "root" );
303+ table .writeRegionServerLogTimestamp (tables1 , rsTimestampMap , "root/backup" );
295304
296305 result = table .readLogTimestampMap ("root" );
297306
0 commit comments