Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from apache:master #27

Merged
merged 78 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
0f2523f
[fix][fn] Throw 404 RestException when state key not found (#21921)
jiangpengcheng Jan 19, 2024
55520bd
[fix][broker] Fix getMessageById throws 500 (#21919)
nodece Jan 19, 2024
c66167b
[improve][ml] Filter out deleted entries before read entries from led…
dao-jun Jan 19, 2024
3158fd3
[fix][broker] Fix leader broker cannot be determined when the adverti…
lhotari Jan 19, 2024
74f1cd5
[improve][misc] Upgrade Netty version to 4.1.105.Final (#21923)
Technoboy- Jan 19, 2024
5cb12a5
[fix][broker] Fix issue with GetMessageIdByTimestamp can't find match…
coderzc Jan 20, 2024
40eebc0
[fix] [broker] Fix write all compacted out entry into compacted topic…
thetumbled Jan 21, 2024
17bb322
[improve] [broker] PIP-299-part-5: Add namespace-level policy: dispat…
Technoboy- Jan 21, 2024
6347315
[fix][broker] Restore the broker id to match the format used in exist…
lhotari Jan 21, 2024
153cd5e
[fix][broker] Unify topic-level policies enable judgment conditions (…
aloyszhang Jan 22, 2024
5a65e98
[fix][broker] Fix deadlock while skip non-recoverable ledgers. (#21915)
hrzzzz Jan 22, 2024
3fa85f0
[fix] [broker] correct compaction phase one timeout meaning (#21908)
thetumbled Jan 22, 2024
22f7323
[feat][admin] PIP-330: getMessagesById gets all messages (#21918)
nodece Jan 22, 2024
b14fcb4
[fix] [test] Fix test code create namespace conflict (#21941)
thetumbled Jan 22, 2024
480a229
[improve][pip] PIP-321 Introduce `allowed-cluster` at the namespace …
liangyepianzhou Jan 23, 2024
1b5550d
[improve][broker] Reduce ResourceGroup log (#21957)
nodece Jan 24, 2024
4198ed2
[fix] Restored method as deprecated in AbstractMetadataStore (#21950)
merlimat Jan 24, 2024
de4edd0
[fix][build] Fix potential insufficient protostuff-related configs (#…
equanz Jan 25, 2024
200c5f4
[fix] [broker] Replication stopped due to unload topic failed (#21947)
poorbarcode Jan 25, 2024
434da8b
[cleanup] [broker] fix doc for TransactionBuffer#isTxnAborted (#21956)
thetumbled Jan 25, 2024
e81a20d
[fix][broker] Avoid consumers receiving acknowledged messages from co…
coderzc Jan 26, 2024
d37d31f
[improve][broker] PIP-315: Configurable max delay limit for delayed d…
KevinLiLu Jan 26, 2024
67354b1
[fix][test] Make base test class method protected so that it passes R…
lhotari Jan 27, 2024
bd913b5
[improve][ci] Upgrade GitHub Actions versions to fix deprecation warn…
lhotari Jan 27, 2024
48e64b3
[fix][fn] Add missing `version` field back to `querystate` API (#21966)
jiangpengcheng Jan 27, 2024
8a18043
[fix][build] Remove duplicate mapping key in docker-compose yaml file…
Denovo1998 Jan 28, 2024
ae272a5
[improve] [bk] Upgrade BookKeeper dependency to 4.16.4 (#21983)
hangc0276 Jan 29, 2024
1b4127a
[fix][broker] Fix schema deletion error when deleting a partitioned t…
heesung-sn Jan 30, 2024
63f0168
[fix][client] Fix ConsumerBuilderImpl#subscribe silent stuck when usi…
Shawyeok Jan 30, 2024
1952f94
[improve] [proxy] Add a check for brokerServiceURL that does not supp…
poorbarcode Jan 30, 2024
925bf2e
[fix] [broker] add timeout for health check read. (#21990)
thetumbled Jan 30, 2024
09559c5
[fix] [broker] Fix reader stuck when read from compacted topic with r…
thetumbled Jan 30, 2024
9636613
[improve][pip] PIP-329: Strategy for maintaining the latest tag to Pu…
RobertIndie Jan 30, 2024
fce0717
[fix][client] Fix multi-topics consumer could receive old messages af…
BewareMyPower Jan 30, 2024
a702e5a
[improve] [test] Remove redudant test code (#21999)
thetumbled Jan 31, 2024
d3b7ca5
[fix][fn] Use unified PackageManagement service to download packages …
jiangpengcheng Jan 31, 2024
57025bc
[improve][broker] Include runtime dependencies in server distribution…
dragosvictor Jan 31, 2024
e7c2a75
[improve][broker] Do not close the socket if lookup failed due to Loc…
BewareMyPower Feb 2, 2024
5dfdcb7
[fix] [test] Fix flaky test testPerTopicExpiredStat (#22018)
315157973 Feb 4, 2024
9c7716c
[improve][client] Mention partitioning in failover priorityLevel java…
mwhipple Feb 5, 2024
5df97b4
[improve][broker] Do not retain the data in the system topic (#22022)
liangyepianzhou Feb 6, 2024
0dabc97
[cleanup] [broker] fix return value of TransactionTimeoutTrackerImpl#…
thetumbled Feb 6, 2024
a77fb6e
[improve] Added CodeQL static scanner (#22037)
merlimat Feb 7, 2024
1c5b4b8
[feat] PIP-335: Oxia metadata plugin (#22009)
merlimat Feb 7, 2024
a83e9ed
[feat] PIP-335: Add support Oxia as a metadata store (#22007)
merlimat Feb 7, 2024
3036783
[fix][broker] Sanitize values before logging in apply-config-from-env…
lhotari Feb 9, 2024
2b75ca0
[improve] PIP-335: Pulsar with Oxia integration test (#22045)
merlimat Feb 9, 2024
8957e35
[feat][misc] PIP-320: Add OpenTelemetry scaffolding (#22010)
dragosvictor Feb 9, 2024
7a90426
[fix] Bump org.apache.solr:solr-core from 8.11.1 to 8.11.3 in /pulsar…
dependabot[bot] Feb 10, 2024
beed0cf
[feat][io] AzureDataExplorer/Kusto Sink for Pulsar (#22006)
asaharn Feb 13, 2024
7e73967
[fix][broker] Fix hash collision when using a consumer name that ends…
lhotari Feb 15, 2024
fc2e314
[fix] Fixed implicit conversions from long -> int (#22055)
merlimat Feb 15, 2024
baddda5
[improve][broker] Add an error log to troubleshoot the failure of sta…
liangyepianzhou Feb 18, 2024
48b4481
[improve] [broker] Do not print an Error log when responding to `HTTP…
poorbarcode Feb 18, 2024
220a3d6
[fix][broker]Support setting `autoSkipNonRecoverableData` dynamically…
chenhongSZ Feb 18, 2024
825e997
[fix] [broker] Subscription stuck due to called Admin API analyzeSubs…
poorbarcode Feb 18, 2024
b375e86
[fix] [broker] Fix can not subscribe partitioned topic with a suffix-…
poorbarcode Feb 19, 2024
0b6bd70
[fix][test] Fix Thread.getThreadGroup().getName() NPE (#22070)
Technoboy- Feb 19, 2024
4097ddd
[fix][broker] Support running docker container with gid != 0 (#22081)
lhotari Feb 21, 2024
613a771
[fix][sec] Upgrade commons-compress to 1.26.0 (#22086)
massakam Feb 21, 2024
1f72817
[fix] [txn] Get previous position by managed ledger. (#22024)
thetumbled Feb 22, 2024
861618a
[fix] [broker] Expire messages according to ledger close time to avoi…
315157973 Feb 22, 2024
08058b9
[improve][ci] Upgrade Gradle Enterprise maven extension version (#22096)
lhotari Feb 22, 2024
48c85ab
[fix][build] Fix building java-test-image without setting IMAGE_JDK_M…
lhotari Feb 22, 2024
5a614e9
[fix][broker] Set ServiceUnitStateChannel topic compaction threshold …
heesung-sn Feb 22, 2024
48c7e32
[improve][admin] Expose the offload threshold in seconds to the amdin…
zymap Feb 23, 2024
1c652f5
[improve] [broker] Do not try to open ML when the topic meta does not…
poorbarcode Feb 23, 2024
8607905
[improve][broker] Cache the internal writer when sent to system topic…
Technoboy- Feb 24, 2024
5c44e1b
[fix][fn] Prevent create state table from API calls for non-exists in…
freeznet Feb 25, 2024
1b1cfb5
[fix] [broker] Enabling batch causes negative unackedMessages due to …
poorbarcode Feb 26, 2024
bbc6224
[improve][fn] Optimize Function Worker startup by lazy loading and di…
lhotari Feb 26, 2024
0c49cac
[fix] [client] fix huge permits if acked a half batched message (#22091)
poorbarcode Feb 26, 2024
31ed115
[fix][sec] Add a check for the input time value (#22023)
liangyepianzhou Feb 26, 2024
0fc9f44
[fix][test] Fix test testTransactionBufferMetrics (#22117)
liangyepianzhou Feb 26, 2024
ae050a1
[improve][ci] Upgrade codecov-action version (#22123)
lhotari Feb 26, 2024
430f4ff
[bug][fn] Prevent `putstate` uses empty values (#22127)
freeznet Feb 27, 2024
3013496
[fix][test] fix test testSyncNormalPositionWhenTBRecover (#22120)
liangyepianzhou Feb 27, 2024
91de98a
[fix][test] Fix test testAsyncFunctionMaxPending (#22121)
liangyepianzhou Feb 27, 2024
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
Prev Previous commit
Next Next commit
[fix][broker] Fix getMessageById throws 500 (apache#21919)
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
  • Loading branch information
nodece authored Jan 19, 2024
commit 55520bd810d29991d4af2124151c8d75c25b0800
Original file line number Diff line number Diff line change
Expand Up @@ -2826,6 +2826,9 @@ protected CompletableFuture<Response> internalGetMessageById(long ledgerId, long
@Override
public void readEntryFailed(ManagedLedgerException exception,
Object ctx) {
if (exception instanceof ManagedLedgerException.LedgerNotExistException) {
throw new RestException(Status.NOT_FOUND, "Message id not found");
}
throw new RestException(exception);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1364,21 +1364,12 @@ public void testGetMessageById() throws Exception {
Message<byte[]> message2 = admin.topics().getMessageById(topicName2, id2.getLedgerId(), id2.getEntryId());
Assert.assertEquals(message2.getData(), data2.getBytes());

Message<byte[]> message3 = null;
try {
message3 = admin.topics().getMessageById(topicName2, id1.getLedgerId(), id1.getEntryId());
Assert.fail();
} catch (Exception e) {
Assert.assertNull(message3);
}

Message<byte[]> message4 = null;
try {
message4 = admin.topics().getMessageById(topicName1, id2.getLedgerId(), id2.getEntryId());
Assert.fail();
} catch (Exception e) {
Assert.assertNull(message4);
}
Assert.expectThrows(PulsarAdminException.NotFoundException.class, () -> {
admin.topics().getMessageById(topicName2, id1.getLedgerId(), id1.getEntryId());
});
Assert.expectThrows(PulsarAdminException.NotFoundException.class, () -> {
admin.topics().getMessageById(topicName1, id2.getLedgerId(), id2.getEntryId());
});
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -987,21 +987,7 @@ public CompletableFuture<Void> truncateAsync(String topic) {

@Override
public CompletableFuture<Message<byte[]>> getMessageByIdAsync(String topic, long ledgerId, long entryId) {
CompletableFuture<Message<byte[]>> future = new CompletableFuture<>();
getRemoteMessageById(topic, ledgerId, entryId).handle((r, ex) -> {
if (ex != null) {
if (ex instanceof NotFoundException) {
log.warn("Exception '{}' occurred while trying to get message.", ex.getMessage());
future.complete(r);
} else {
future.completeExceptionally(ex);
}
return null;
}
future.complete(r);
return null;
});
return future;
return getRemoteMessageById(topic, ledgerId, entryId);
}

private CompletableFuture<Message<byte[]>> getRemoteMessageById(String topic, long ledgerId, long entryId) {
Expand Down