Skip to content

Commit

Permalink
Move message release logic to correct space. (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
syhily authored Oct 31, 2022
1 parent c0764db commit d0e1508
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/themes/book
Submodule book updated 72 files
+1 −0 .gitignore
+71 −24 README.md
+2 −1 archetypes/docs.md
+3 −1 archetypes/posts.md
+9 −19 assets/_fonts.scss
+46 −65 assets/_main.scss
+6 −1 assets/_markdown.scss
+24 −0 assets/clipboard.js
+1 −1 assets/menu-reset.js
+0 −32 assets/search-data.js
+15 −0 assets/search-data.json
+24 −21 assets/search.js
+12 −1 exampleSite/config.toml
+12 −1 exampleSite/config.yaml
+79 −0 exampleSite/content.bn/_index.md
+24 −21 exampleSite/content/docs/shortcodes/mermaid.md
+6 −0 exampleSite/content/docs/shortcodes/section/first-page.md
+0 −1 exampleSite/content/docs/shortcodes/section/page1.md
+0 −1 exampleSite/content/docs/shortcodes/section/page2.md
+6 −0 exampleSite/content/docs/shortcodes/section/second-page.md
+1 −1 exampleSite/content/menu/index.md
+1 −1 exampleSite/resources/_gen/assets/scss/book.scss_50fc8c04e12a2f59027287995557ceff.content
+1 −1 exampleSite/resources/_gen/assets/scss/book.scss_50fc8c04e12a2f59027287995557ceff.json
+0 −1 exampleSite/resources/_gen/assets/scss/example/book.scss_50fc8c04e12a2f59027287995557ceff.content
+0 −1 exampleSite/resources/_gen/assets/scss/example/book.scss_50fc8c04e12a2f59027287995557ceff.json
+3 −0 go.mod
+14 −0 i18n/am.yaml
+14 −0 i18n/bn.yaml
+20 −0 i18n/fa.yaml
+14 −0 i18n/it.yaml
+14 −0 i18n/tr.yaml
+20 −0 i18n/zh-TW.yaml
+0 −1 layouts/404.html
+8 −8 layouts/_default/baseof.html
+1 −1 layouts/partials/docs/brand.html
+9 −5 layouts/partials/docs/footer.html
+1 −0 layouts/partials/docs/html-head-title.html
+24 −12 layouts/partials/docs/html-head.html
+0 −0 layouts/partials/docs/inject/toc-after.html
+0 −0 layouts/partials/docs/inject/toc-before.html
+24 −19 layouts/partials/docs/languages.html
+1 −0 layouts/partials/docs/menu-bundle.html
+7 −4 layouts/partials/docs/menu-filetree.html
+3 −0 layouts/partials/docs/menu.html
+11 −1 layouts/partials/docs/post-meta.html
+3 −1 layouts/partials/docs/title.html
+2 −0 layouts/partials/docs/toc.html
+1 −1 layouts/posts/list.html
+2 −4 layouts/posts/single.html
+2 −2 layouts/shortcodes/button.html
+3 −3 layouts/shortcodes/columns.html
+3 −2 layouts/shortcodes/details.html
+1 −1 layouts/shortcodes/hint.html
+1 −1 layouts/shortcodes/section.html
+1 −1 layouts/shortcodes/tabs.html
+1 −1 layouts/taxonomy/taxonomy.html
+ static/fonts/roboto-mono-v13-latin-regular.woff
+ static/fonts/roboto-mono-v13-latin-regular.woff2
+ static/fonts/roboto-mono-v6-latin-regular.woff
+ static/fonts/roboto-mono-v6-latin-regular.woff2
+ static/fonts/roboto-v19-latin-300italic.woff
+ static/fonts/roboto-v19-latin-300italic.woff2
+ static/fonts/roboto-v19-latin-700.woff
+ static/fonts/roboto-v19-latin-700.woff2
+ static/fonts/roboto-v19-latin-regular.woff
+ static/fonts/roboto-v19-latin-regular.woff2
+ static/fonts/roboto-v27-latin-700.woff
+ static/fonts/roboto-v27-latin-700.woff2
+ static/fonts/roboto-v27-latin-regular.woff
+ static/fonts/roboto-v27-latin-regular.woff2
+5 −22 static/mermaid.min.js
+1 −0 theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public void emitRecord(

deserializationSchema.deserialize(element, sourceOutputWrapper);
splitState.setLatestConsumedId(element.getMessageId());

// Recycle message.
element.release();
}

private static class SourceOutputWrapper<T> implements Collector<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ protected Message<byte[]> pollMessage(Duration timeout) throws PulsarClientExcep
protected void finishedPollMessage(Message<?> message) {
// Nothing to do here.
LOG.debug("Finished polling message {}", message);

// Release message
message.release();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ protected void finishedPollMessage(Message<?> message) {
if (sourceConfiguration.isEnableAutoAcknowledgeMessage()) {
sneakyClient(() -> pulsarConsumer.acknowledge(message));
}

// Release message
message.release();
}

@Override
Expand Down

0 comments on commit d0e1508

Please sign in to comment.