Skip to content

Commit 2bd1624

Browse files
committed
Always lock incrementally.
This change was requested in #1534 but I think fell through the cracks.
1 parent 5b0faf9 commit 2bd1624

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

base/cvd/cuttlefish/host/commands/cvd/cli/selector/creation_analyzer.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,10 @@ CreationAnalyzer::AnalyzeInstanceIdsInternal(bool acquire_file_locks) {
149149
"For now, cvd server always acquire the file locks "
150150
<< "when IDs are automatically allocated.");
151151

152-
const auto incremental = selector_options_parser_.UseCvdalloc();
153152
// As this test was done earlier, this line must not fail
154153
const auto n_instances = selector_options_parser_.RequestedNumInstances();
155154
auto acquired_all_file_locks =
156-
incremental ? CF_EXPECT(instance_lock_file_manager_.AcquireUnusedLocks(
157-
n_instances))
158-
: CF_EXPECT(instance_lock_file_manager_.LockAllAvailable());
155+
CF_EXPECT(instance_lock_file_manager_.AcquireUnusedLocks(n_instances));
159156
auto id_to_lockfile_map =
160157
ConstructIdLockFileMap(std::move(acquired_all_file_locks));
161158

0 commit comments

Comments
 (0)