vaijosh commented on code in PR #3164:
URL: https://github.com/apache/hugegraph/pull/3164#discussion_r3896232921


##########
docker/test/test-snapshot-corruption.sh:
##########
@@ -0,0 +1,322 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+# test-snapshot-corruption.sh — load-path reproducer for the HStore snapshot 
corruption bug
+#
+# This script covers the LOAD side of the fix (SnapshotHandler.onSnapshotLoad):
+#   default mode  — simulates Sub-case A outcome (missing data/ dir) to verify 
the load error
+#   --fixed mode  — simulates Sub-case B (should_not_load present, data/ 
missing) to verify Fix 2
+#
+# The SAVE side of the fix (SnapshotHandler.onSnapshotSave throwing when 
compaction state==doing)
+# cannot be reproduced deterministically here: /test/compact submits a 
background job and returns
+# immediately, so the race window is too narrow to hit reliably from a shell 
script.
+# Save-side coverage lives in the unit test: HgSnapshotHandlerTest.
+#
+# Requires: Docker Desktop >= 20.10, >= 12 GB allocated to Docker, Docker 
Compose v2
+# Run from the repo root:
+#   bash docker/hbase/test/test-snapshot-corruption.sh            # confirm 
load-path bug is present (buggy image)
+#   bash docker/hbase/test/test-snapshot-corruption.sh --fixed    # confirm 
load-path fix is active (fixed image)

Review Comment:
   I have removed `test-snapshot-corruption.sh` because I was unable to 
reproduce the original issue (the `saveSnapshot` race condition) using it. 
Instead, I have covered those scenarios with unit tests in a more deterministic 
way.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to