Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
50 changes: 44 additions & 6 deletions .github/workflows/ci-pr-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,25 @@ jobs:
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
restore-keys: vcpkg-${{ runner.os }}-

- name: Restore vcpkg downloads cache
uses: actions/cache@v4
with:
path: vcpkg/downloads
key: vcpkg-downloads-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
restore-keys: vcpkg-downloads-${{ runner.os }}-

- name: Build the project
run: |
cmake -B build -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cmake --build build -j8
for attempt in 1 2 3; do
echo "Build attempt $attempt/3"
if cmake -B build -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON && cmake --build build -j8; then
exit 0
fi
echo "Attempt $attempt failed (e.g. vcpkg download 502), retrying in 90s..."
sleep 90
done
echo "All build attempts failed"
exit 1

- name: Tidy check
run: |
Expand Down Expand Up @@ -137,10 +152,25 @@ jobs:
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
restore-keys: vcpkg-${{ runner.os }}-

- name: Restore vcpkg downloads cache
uses: actions/cache@v4
with:
path: vcpkg/downloads
key: vcpkg-downloads-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
restore-keys: vcpkg-downloads-${{ runner.os }}-

- name: Build core libraries
run: |
cmake -B build -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=OFF
cmake --build build -j8
for attempt in 1 2 3; do
echo "Build attempt $attempt/3"
if cmake -B build -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=OFF && cmake --build build -j8; then
exit 0
fi
echo "Attempt $attempt failed (e.g. vcpkg download 502), retrying in 90s..."
sleep 90
done
echo "All build attempts failed"
exit 1

- name: Check formatting
run: |
Expand All @@ -164,8 +194,16 @@ jobs:

- name: Build with Boost.Asio
run: |
cmake -B build-boost-asio -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=ON
cmake --build build-boost-asio -j8
for attempt in 1 2 3; do
echo "Build Boost.Asio attempt $attempt/3"
if cmake -B build-boost-asio -DINTEGRATE_VCPKG=ON -DBUILD_TESTS=ON && cmake --build build-boost-asio -j8; then
exit 0
fi
echo "Attempt $attempt failed (e.g. vcpkg download 502), retrying in 90s..."
sleep 90
done
echo "All build attempts failed"
exit 1

- name: Build perf tools
run: |
Expand Down
8 changes: 7 additions & 1 deletion lib/ConsumerImpl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1819,7 +1819,13 @@ void ConsumerImpl::seekAsyncInternal(long requestId, const SharedBuffer& seek, c
if (result == ResultOk) {
LockGuard lock(mutex_);
if (getCnx().expired() || reconnectionPending_) {
// It's during reconnection, complete the seek future after connection is established
// It's during reconnection, complete the seek future after connection is established.
// Clear local state now so hasMessageAvailable() does not see stale prefetched messages.
ackGroupingTrackerPtr_->flushAndClean();
incomingMessages_.clear();
if (lastSeekArg_.has_value() && std::holds_alternative<MessageId>(lastSeekArg_.value())) {
startMessageId_ = std::get<MessageId>(lastSeekArg_.value());
}
Comment thread
BewareMyPower marked this conversation as resolved.
Outdated
seekStatus_ = SeekStatus::COMPLETED;
LOG_INFO(getName() << "Delay the seek future until the reconnection is done");
} else {
Expand Down
Loading