René's URL Explorer Experiment


Title: batch/chunk-exception sample has too strong a dependency on WildFly behavior (incl. bug?) on retry after rollback · Issue #281 · javaee-samples/javaee7-samples · GitHub

Open Graph Title: batch/chunk-exception sample has too strong a dependency on WildFly behavior (incl. bug?) on retry after rollback · Issue #281 · javaee-samples/javaee7-samples

X Title: batch/chunk-exception sample has too strong a dependency on WildFly behavior (incl. bug?) on retry after rollback · Issue #281 · javaee-samples/javaee7-samples

Description: Summary There are some differences between GlassFish and WildFly in the retry behavior after a rollback. This affects the metric counts (as the test observes in a commented-out assertion on the skipped write count). I think, though, that...

Open Graph Description: Summary There are some differences between GlassFish and WildFly in the retry behavior after a rollback. This affects the metric counts (as the test observes in a commented-out assertion on the ski...

X Description: Summary There are some differences between GlassFish and WildFly in the retry behavior after a rollback. This affects the metric counts (as the test observes in a commented-out assertion on the ski...

Opengraph URL: https://github.com/javaee-samples/javaee7-samples/issues/281

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"batch/chunk-exception sample has too strong a dependency on WildFly behavior (incl. bug?) on retry after rollback ","articleBody":"# Summary\n\nThere are some differences between GlassFish and WildFly in the retry behavior after a rollback.   This affects the metric counts (as the test observes in a commented-out assertion on the skipped write count).  I think, though, that there might be a bug in the WildFly implementation.   Here is a writeup of my findings and some suggestions.\n# Some background\n\nCurrently, GlassFish 4.1. includes the 1.0 version of \"jbatch\" (the Batch RI).  Unfortunately, in this version, we failed to correctly implement the retry behavior described in the 1.0 spec:\n\n_8.2.1.4.4 Default Retry Behavior - Rollback\nWhen a retryable exception occurs, the default behavior... rollback the current chunk and   re-process it with an item-count of 1..._\n\nWe addressed this in the pending release of jbatch version 1.0.1, which I've just been testing these samples against    (This will be at some point integrated into GlassFish though I couldn't say exactly when or what version.)  The code is here:  https://github.com/WASdev/standards.jsr352.jbatch.\n\nFrom here on when I refer to GF, I mean GF assuming the inclusion of the pending jbatch 1.0.1 update.\n# Test Flow\n\nLet me start contrasting the chunk-by-chunk sequence across GF and WF, and then look at the test assertions.\n## GF (post-1.0.1)\n### Each line represents a chunk, with any special explanation supplied\n\n1,2,3\n4,5 (rollback, retry after reader exception)\n4  (1-at-a-time processing on retry after rollback)\n5\n6,7,8 (skip 6, 8 causes retry after writer exception)\n6  (1-at-a-time processing, skip, write nothing)\n7 \n8 (skip after writer exception because now that we're already in retry, skip causes precedence)\n9,10 (end of data)\n## WildFly\n### (Based on the SysOut, not detailed debugging).\n\n1,2,3 \n4,5 (retry after reader exception)\n4\n5, 6, 7 -> (skip 6, write 5,7)  # First difference from GF\n8, 9, 10 -> (retry after writer exception)\n8 (skip after writer exc)\n9 (write 8,9 and skip)\n10 (write 8,9,10 and retry, perhaps because skip limit is reached)\n8 (# retries on exc throw has surpassed, so stop throwing exceptions)\n9\n10\n\nSo the behavior diverges during the first retry.  In GF, after the reader throws a retryable exc on item 5, \nwe process items 4 and 5, each in single-item chunk.   In WF, after item 4 is processed in a single-item chunk, items 5-7 are attempted to be handled in a normal-sized chunk (given item-count=3).  \n\nIn GF, then, we revert to normal chunk size starting with item 6.  We skip item 6 in the processor, and then the presence of item 8 causes the writer to throws a (retryable) exception.  We then handle 6-8 one at a time, skipping 6 again (in process), and this time skipping item 8 (since on retry, the skippable takes precedence over the retryable configuration for this exception).\n\nIn WF, the next chunk consists of items 8-10, which forces a retryable exception from the writer.  On retry with a single-item chunk of item 8, the writer again throws an exception, and this time skip takes precedence.\n## Bug in WF? (or am I missing something)\n\nNext things start looking strange to me.\n\nThe reader next reads item 9, however the SysOut shows that the writer is passed both items 8 and 9, instead of just the single item 9.   The presence of item 8 triggers the exception thrown by the writer logic.    It seems then we continue on enough times so the `if (retries \u003c= 3)` check fails and we stop throwing exceptions.\n\nStepping through the WF behavior in even more details raises a couple more questions, but if this is just a bug then maybe these aren't worth going into.\n## Suggestions\n\nNow, I'm not clear on exactly which behaviors this sample was intended to showcase and test.   \n\nPinning down the exact metrics across WF and GF is going to be tricky since every detail of the retry after rollback processing is not completey specified, as well as the fact that the behavior of the metrics across rollback is not completely specified.   E.g. in the above example, in GF we count 2 processor skips for item 6, vs. 1 for WF, and in GF we count 1 writer skip for item 8 vs. 2 for WF.\n\nIf there is indeed a WF bug here, then it's possible both WF and GF would use only 1 writer skip.   However the difference in processor skips may remain.\n\nI'd suggest for a sample/test like this adding a check of which records are ultimately written by the writer, since this is truly the real end result of this job.\n\nIn GF, we'll ultimately write items:\n (1,2,3,4,5,7,9,10)\n\nIn WF, we'll end up writing items:\n (1,2,3,4,5,7,8,9,10)\n(again, I'm guessing item 8 gets written as a bug)\n\nThis difference is more concerning than the metric count difference.    I don't want to say the spec has conclusively eliminated any possibility of this happening across implementations, but I wonder if there is a WF and if it is fixed if this difference would go away.\n## Code\n\nIn af7495158c259c8e6d00f7c161caf4ff4291d563, I conveniently changed the test to work for GF.   It will fail with WF, currently, though, but I imagine it could work for WF if there is a bug that is fixed.\n","author":{"url":"https://github.com/scottkurz","@type":"Person","name":"scottkurz"},"datePublished":"2014-12-14T18:31:47Z","url":"https://github.com/javaee-samples/javaee7-samples/issues/281"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:58107cf6-3531-86c8-57e4-e01cf1512d45
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE7A2:A71F9:2C64CC6:383818B:6B01E905
html-safe-nonce5e3ae36e750a7e03d98660d1b75b93ea9b8ab9d47e9a6493265f02960a13be53
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFN0EyOkE3MUY5OjJDNjRDQzY6MzgzODE4Qjo2QjAxRTkwNSIsInZpc2l0b3JfaWQiOiI4NzA2MzI2NDc2NjQ1MDY3MDEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac4dd3b82ed078c88cc1a82c359fc45b9603b37b43f95587c1c6745fee4d3525ad
hovercard-subject-tagissue:51927095
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/javaee-samples/javaee7-samples/281/issue_layout
twitter:imagehttps://opengraph.githubassets.com/06c77308ec25c7b553990e58577017f3a768b4e1035ac780f56e6c2db16e93fe/javaee-samples/javaee7-samples/issues/281
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/06c77308ec25c7b553990e58577017f3a768b4e1035ac780f56e6c2db16e93fe/javaee-samples/javaee7-samples/issues/281
og:image:altSummary There are some differences between GlassFish and WildFly in the retry behavior after a rollback. This affects the metric counts (as the test observes in a commented-out assertion on the ski...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamescottkurz
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/javaee-samples/javaee7-samples git https://github.com/javaee-samples/javaee7-samples.git
octolytics-dimension-user_id6052086
octolytics-dimension-user_loginjavaee-samples
octolytics-dimension-repository_id12414592
octolytics-dimension-repository_nwojavaee-samples/javaee7-samples
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id12414592
octolytics-dimension-repository_network_root_nwojavaee-samples/javaee7-samples
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/javaee-samples/javaee7-samples/issues/281#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjavaee-samples%2Fjavaee7-samples%2Fissues%2F281
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fjavaee-samples%2Fjavaee7-samples%2Fissues%2F281
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=javaee-samples%2Fjavaee7-samples
Reloadhttps://github.com/javaee-samples/javaee7-samples/issues/281
Reloadhttps://github.com/javaee-samples/javaee7-samples/issues/281
Reloadhttps://github.com/javaee-samples/javaee7-samples/issues/281
javaee-sampleshttps://github.com/javaee-samples
javaee7-sampleshttps://github.com/javaee-samples/javaee7-samples
Codehttps://github.com/javaee-samples/javaee7-samples
Issues93 (93)https://github.com/javaee-samples/javaee7-samples/issues
Pull requests20 (20)https://github.com/javaee-samples/javaee7-samples/pulls
Actionshttps://github.com/javaee-samples/javaee7-samples/actions
Projectshttps://github.com/javaee-samples/javaee7-samples/projects
Wikihttps://github.com/javaee-samples/javaee7-samples/wiki
Security and qualityhttps://github.com/javaee-samples/javaee7-samples/security
Insightshttps://github.com/javaee-samples/javaee7-samples/insights
https://github.com/javaee-samples/javaee7-samples
New issuehttps://github.com/login?return_to=https://github.com/javaee-samples/javaee7-samples/issues/281
New issuehttps://github.com/login?return_to=https://github.com/javaee-samples/javaee7-samples/issues/281
batch/chunk-exception sample has too strong a dependency on WildFly behavior (incl. bug?) on retry after rollback https://github.com/javaee-samples/javaee7-samples/issues/281#top
https://github.com/scottkurz
scottkurzhttps://github.com/scottkurz
on Dec 14, 2014https://github.com/javaee-samples/javaee7-samples/issues/281#issue-51927095
https://github.com/WASdev/standards.jsr352.jbatchhttps://github.com/WASdev/standards.jsr352.jbatch
af74951https://github.com/javaee-samples/javaee7-samples/commit/af7495158c259c8e6d00f7c161caf4ff4291d563
https://github.com/radcortez
radcortezhttps://github.com/radcortez
on Dec 16, 2014https://github.com/javaee-samples/javaee7-samples/issues/281#issuecomment-67096377
@scottkurzhttps://github.com/scottkurz
https://github.com/chengfang
chengfanghttps://github.com/chengfang
on Dec 16, 2014https://github.com/javaee-samples/javaee7-samples/issues/281#issuecomment-67246426
@scottkurzhttps://github.com/scottkurz
@radcortezhttps://github.com/radcortez
https://github.com/radcortez
radcortezhttps://github.com/radcortez
on Dec 17, 2014https://github.com/javaee-samples/javaee7-samples/issues/281#issuecomment-67258745
@chengfanghttps://github.com/chengfang
https://github.com/chengfang
chengfanghttps://github.com/chengfang
on Dec 17, 2014https://github.com/javaee-samples/javaee7-samples/issues/281#issuecomment-67368116
https://issues.jboss.org/browse/JBERET-122https://issues.jboss.org/browse/JBERET-122
@radcortezhttps://github.com/radcortez
https://issues.jboss.org/browse/JBERET-124https://issues.jboss.org/browse/JBERET-124
https://github.com/radcortez
radcortezhttps://github.com/radcortez
on Dec 21, 2014https://github.com/javaee-samples/javaee7-samples/issues/281#issuecomment-67790586
https://java.net/projects/jbatch/lists/public/archivehttps://java.net/projects/jbatch/lists/public/archive
https://github.com/chengfang
chengfanghttps://github.com/chengfang
on Dec 22, 2014https://github.com/javaee-samples/javaee7-samples/issues/281#issuecomment-67840098
@radcortezhttps://github.com/radcortez
https://github.com/radcortez
radcortezhttps://github.com/radcortez
on Dec 22, 2014https://github.com/javaee-samples/javaee7-samples/issues/281#issuecomment-67872939
https://github.com/BrentDouglas
BrentDouglashttps://github.com/BrentDouglas
on Dec 24, 2014https://github.com/javaee-samples/javaee7-samples/issues/281#issuecomment-68050072
@radcortezhttps://github.com/radcortez
https://github.com/radcortez
radcortezhttps://github.com/radcortez
on Dec 26, 2014https://github.com/javaee-samples/javaee7-samples/issues/281#issuecomment-68145376
@BrentDouglashttps://github.com/BrentDouglas
https://java.net/projects/jbatch/lists/public/archive/2014-12/message/13https://java.net/projects/jbatch/lists/public/archive/2014-12/message/13
Sign up for freehttps://github.com/signup?return_to=https://github.com/javaee-samples/javaee7-samples/issues/281
Sign in to commenthttps://github.com/login?return_to=https://github.com/javaee-samples/javaee7-samples/issues/281
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.