Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.Type;
import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.VolumeInfo;
import org.apache.hadoop.ozone.protocolPB.OzoneManagerProtocolServerSideTranslatorPB;
import org.apache.ozone.test.tag.Flaky;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
Expand Down Expand Up @@ -232,7 +231,6 @@ public void testFailoverWithSuggestedLeader() throws Exception {
* to immediately see the changes.
*/
@Test
@Flaky("HDDS-14741")
void testLinearizableReadConsistency() throws Exception {
// Setup another client
OzoneConfiguration clientConf = new OzoneConfiguration(getConf());
Expand All @@ -251,7 +249,6 @@ void testLinearizableReadConsistency() throws Exception {
assertNotSame(
OmTestUtil.getFollowerReadFailoverProxyProvider(getObjectStore()),
otherClientFollowerReadProxyProvider);
String initialProxyOmNodeId = otherClientFollowerReadProxyProvider.getCurrentProxy().getNodeId();

// Setup the bucket and create a key with the default client
OzoneBucket ozoneBucket = setupBucket();
Expand All @@ -264,17 +261,17 @@ void testLinearizableReadConsistency() throws Exception {
ozoneBucket.getVolumeName(), ozoneBucket.getName(), key);
assertEquals(key, keyReadFromAnotherClient.getName());

// Create a more keys
// Create more keys and verify another client can read the last one after bulk writes.
String lastBulkKey = null;
for (int i = 0; i < 100; i++) {
createKey(ozoneBucket);
lastBulkKey = createKey(ozoneBucket);
}
Comment on lines +265 to 268

List<OzoneKey> ozoneKeys = anotherObjectStore.getClientProxy().listKeys(
ozoneBucket.getVolumeName(), ozoneBucket.getName(),
null, null, 1000);
assertEquals(101, ozoneKeys.size());
// Since the OM node is normal, it should not failover
assertEquals(initialProxyOmNodeId, otherClientFollowerReadProxyProvider.getCurrentProxy().getNodeId());
for (OzoneManager om : getCluster().getOzoneManagersList()) {
om.awaitDoubleBufferFlush();
}
OzoneKey lastBulkKeyRead = anotherObjectStore.getClientProxy().headObject(
ozoneBucket.getVolumeName(), ozoneBucket.getName(), lastBulkKey);
assertEquals(lastBulkKey, lastBulkKeyRead.getName());
} finally {
IOUtils.closeQuietly(anotherClient);
}
Expand Down