Skip to content
Merged
Show file tree
Hide file tree
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 @@ -382,7 +382,9 @@ public Instant getCurrentSnapshotTime() {
public <R> R get(final Function<Db<?, ?>, R> function) {
return guard.acquire(() -> {
if (db == null) {
return null;
throw fetchException != null
? fetchException
: new RuntimeException("Snapshot database is not available");
}
return function.apply(db);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import stroom.planb.shared.PlanBDoc;
import stroom.query.language.functions.StateProvider;
import stroom.query.language.functions.Val;
import stroom.query.language.functions.ValErr;
import stroom.query.language.functions.ValNull;
import stroom.security.api.SecurityContext;
import stroom.util.logging.LambdaLogger;
Expand Down Expand Up @@ -70,7 +71,7 @@ public Val getState(final String mapName, final String keyName, final long effec
.orElse(ValNull.INSTANCE);
} catch (final Exception e) {
LOGGER.debug(e::getMessage, e);
return null;
return ValErr.create(e.getMessage());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import stroom.query.language.functions.StateProvider;
import stroom.query.language.functions.Val;
import stroom.query.language.functions.ValBoolean;
import stroom.query.language.functions.ValErr;
import stroom.query.language.functions.ValNull;
import stroom.query.language.functions.ValString;
import stroom.state.impl.CqlSessionFactory;
Expand Down Expand Up @@ -83,7 +84,7 @@ public Val getState(final String mapName, final String keyName, final long effec
.orElse(ValNull.INSTANCE);
} catch (final Exception e) {
LOGGER.debug(e::getMessage, e);
return null;
return ValErr.create(e.getMessage());
}
}

Expand Down
68 changes: 68 additions & 0 deletions unreleased_changes/20260713_163821_541__5657.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
* Bug **#5657** : Improve Plan B lookup error handling.


```sh
# ********************************************************************************
# Issue number: 5657
# Issue title: Plan B lookup in Rules are maybe failing silently
# Issue tags: f:dash / query
# Issue link: https://github.com/gchq/stroom/issues/5657
# ********************************************************************************

# ONLY the top line will be included as a change entry in the CHANGELOG.
# The entry should be in GitHub flavour markdown and should be written on a SINGLE
# line with no hard breaks. You can have multiple change files for a single GitHub issue.
# The entry should be written in the imperative mood, i.e. 'Fix nasty bug' rather than
# 'Fixed nasty bug'.
#
# Examples of acceptable entries are:
#
#
# * Bug **#123** : Fix bug with an associated GitHub issue in this repository.
#
# * Bug **namespace/other-repo#456** : Fix bug with an associated GitHub issue in another repository.
#
# * Feature **#789** : Add new feature X.
#
# * Bug : Fix bug with no associated GitHub issue.
#
#
# Note: The line must start '* XXX ', where 'XXX' is a valid category,
# one of [Bug Feature Refactor Dependency Build].


# --------------------------------------------------------------------------------
# The following is random text to make this file unique for git's change detection
# tsw2BfR1emXfSQkVpebrRq8VCOrMNeTZX5c408NLePV9bcvahpBYGmk5MfpcH3Jg4ZTIrpQaW2G6ATco
# bUvxr6CekYfXzDa7an9NFVYHnx8uWoKXzpVN0uYCHXUS1O9myAqXTXLmIjOvI0wOcblc2X1XMVK5V75R
# 46a0S54a1TEarc0QlZbv8CfdLGItgW75vj1rQiczGgkCys7IjqRy7iQWFDPFkP7HXq96bqr6Qg0ldSy2
# j9Ys7OgO4vbdG4DDUckRJdSido0Q9llaLtrn1K6KdsTyAqOlgO7sDyv7Q0zjM2AIoYesDDoboFvo5XBy
# eMujSlrwIomnVXL8d5XOJtnR5MT0OU6FnquxIBEIKqQ1d0nZJAnMvr7c78I7j1IHZGHZkYHUBvbiojXv
# ZgRUbDkd2Jn7ucHknb7bFxzrMrD7r8DGwgyQPQXSpkJAVf2psQuTcAlCVhztXMWWY7NVYelmFcLeLdme
# R8fC2avgkaV03gNqE4u07pEiDK3S3s2F1Yz2wxVcJQsAp5m0HN6hk1XcWj7uArAM1gUwskzk72RC6JC8
# Doa3fJuLsfzBMMJuACLdyjRvB191unul95vYy0N2uObc4mdIwUzXlZB5u017rMCD9qn6XEzrrHvG7XZA
# lUsbQyA44zoVOu67HnwtsxcFI2rYZ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7CPOoTaQF0DS7tvtWB1wcnaqiVlafDQhURBb
# 3jUhVoB3niNNsAnJ5M1yAeLpwQwtpw2cxHt3N6ggjU1cSUs9xuMmeYHSYro6vMSHXZLF4XtyicmXCeWZ
# zAA5S8J0nnchfAAJQcSTxAI7fpB8kX9J2CjcMfVdgFqzAK1bSvZbcqJmuJGIn7f2OV9I7rnnmyp0rk4b
# ZAEu8yuMGTd7mcAtPmYgjFQOWN4is27Z9pzH06Nwi5lxQGacD0wChFUh9WvIWqAOghls9Cg2vaqW9FVv
# cOsIiiV0H0IlqIxuMmZnPWcD85gVTygy8X4tqntgNyosM6T2KbOpgKs0OjGHuaBLIwPIN0lZPxOk8JnX
# 1iihBGD3ObN61TSD3htEhqUGc2izXRmNOCByLpXQkzpBcQ5MHHnovK1FDlY2hOQJGhOb9KzxtIi9Vdz5
# P1o0eWdT8WYrMt71b9WqVl6YZeqXkrKVbZwG9plB7E5nAS2zxKJkWG8IGGzWhnrZbEVf5P1LnhPKT0CX
# 0Tpw7AoQruwpsoueGjp74AtBVo2NuKDXyiBXTrKAMRBmK2FQbUqg1H5EOVPovvNaj5hF43paTl71OYQf
# oLDGJ1xvQlUFzqhScadzS19Df6zuvl2k7CEtugUFHZNsSiJ741fllarmvwbuzoCe9o7wYBaB1HUAQYLS
# --------------------------------------------------------------------------------

```
Loading