Buckets:
AnonymousSpottedToad/candidate_bucket / preliminary /mappings /java /limit_request_rate /apache_incubator-seata.json
| { | |
| "role_mappings": [ | |
| { | |
| "role": "Entity", | |
| "status": "present", | |
| "symbol": "begin", | |
| "file": "tm/src/main/java/org/apache/seata/tm/DefaultTransactionManager.java", | |
| "lines": "84", | |
| "notes": "In-repo TM client SDK: DefaultTransactionManager.begin builds a GlobalBeginRequest (line 86) and sends it to the TC server via syncCall (line 89), which reaches DefaultCoordinator.onRequest and the rate-limiting Enforcer RateLimiterHandler.handle." | |
| }, | |
| { | |
| "role": "Enforcer", | |
| "status": "present", | |
| "symbol": "handle", | |
| "file": "server/src/main/java/org/apache/seata/server/limit/ratelimit/RateLimiterHandler.java", | |
| "lines": "73", | |
| "notes": "Every inbound TC request goes DefaultCoordinator.onRequest (server/.../coordinator/DefaultCoordinator.java:805) -> LimitRequestDecorator.handle (LimitRequestDecorator.java:44) -> RateLimiterHandler.handle, which for GlobalBegin calls rateLimiter.canPass() (line 79) and on refusal returns a failed GlobalBeginResponse with a rate-limit message, otherwise forwards via next() (line 91). Caveat: limiting is disabled unless server.ratelimit.enable=true." | |
| }, | |
| { | |
| "role": "Limiter", | |
| "status": "present", | |
| "symbol": "canPass", | |
| "file": "server/src/main/java/org/apache/seata/server/limit/ratelimit/TokenBucketLimiter.java", | |
| "lines": "105", | |
| "notes": "Called from RateLimiterHandler.handle (RateLimiterHandler.java:79); TokenBucketLimiter (SPI-loaded via EnhancedServiceLoader at RateLimiterHandler.java:62) decides allow/block by bucket.tryConsume(1) on a Bucket4j token bucket. Global (server-wide) limit, not per-entity." | |
| }, | |
| { | |
| "role": "HistoryProvider", | |
| "status": "external", | |
| "symbol": "tryConsume", | |
| "file": "server/src/main/java/org/apache/seata/server/limit/ratelimit/TokenBucketLimiter.java", | |
| "lines": "106", | |
| "notes": "Reached from canPass (TokenBucketLimiter.java:105). The request history is the token state of the Bucket4j io.github.bucket4j.Bucket (built in initBucket, TokenBucketLimiter.java:143-150); tryConsume both reads and updates that state inside the library. Single global bucket, no per-entity history." | |
| }, | |
| { | |
| "role": "PolicyProvider", | |
| "status": "present", | |
| "symbol": "init", | |
| "file": "server/src/main/java/org/apache/seata/server/limit/ratelimit/TokenBucketLimiter.java", | |
| "lines": "82", | |
| "notes": "TokenBucketLimiter.init loads the policy (enable, bucketTokenNumPerSecond, bucketTokenMaxNum, bucketTokenInitialNum) from Seata Configuration keys (ConfigurationKeys.java:1283-1303) and builds the bucket used by canPass. Dynamic updates come through RateLimiterHandler.onChangeEvent (RateLimiterHandler.java:106) -> reInit (TokenBucketLimiter.java:110)." | |
| }, | |
| { | |
| "role": "System", | |
| "status": "present", | |
| "symbol": "doGlobalBegin", | |
| "file": "server/src/main/java/org/apache/seata/server/coordinator/DefaultCoordinator.java", | |
| "lines": "321", | |
| "notes": "When allowed, RateLimiterHandler.next -> AbstractTransactionRequestHandler.next (AbstractTransactionRequestHandler.java:44) -> GlobalBeginRequest.handle -> AbstractTCInboundHandler.handle (AbstractTCInboundHandler.java:66) -> DefaultCoordinator.doGlobalBegin, which begins the global transaction (the only rate-limited request type)." | |
| } | |
| ] | |
| } | |
Xet Storage Details
- Size:
- 3.38 kB
- Xet hash:
- 7d655f56d61f0673917ea174aec4a6a6faa04b5d097dbd8f3f843432d77b1acd
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.