Uploaded image for project: 'Apache ServiceComb'
  1. Apache ServiceComb
  2. SCB-2656

The traffic limiting modole of java-chassis has problems in the dynamic configration scenario

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • java-chassis-2.8.0
    • Java-Chassis
    • None

    Description

      Problem triggered scenario

      Suppose there are two microservices A and B developed by the Java-chassis framework, and the B microservice has A contract interface with qualifiedName= b.Scchema.oper. If A traffic limiting rule for any.schema. oper is added to microservice B in the configuration center after the service is started, A invokes the OPER interface of B. B of the org. Apache. Servicecomb. QPS. QpsControllerManager# configQpsControllerMap attribute cache A.s chema. Oper QpsStrategy object actually is Any.schema. oper Specifies the configuration item.

      When you delete the traffic limiting rule of the any.schema. oper interface from the configuration center, Dynamic configuration to refresh the callback will trigger org. Apache. Servicecomb. QPS. QpsControllerManager# updateObjMap method to refresh the cache each interface QpsStrategy object, Oper key (configKey= any.schema. oper) does not match the a.sama. oper key cached in configQpsControllerMap. Therefore, the QpsStrategy object pointed to by a.sama. oper cannot be refreshed. It is still the any.schema. oper configuration item, and the configuration value is null. Lead to org. Apache. Servicecomb. QPS. Strategy. FixedWindowStrategy# isLimitNewRequest of enclosing getQpsLimit () = = null check is true, Throws an IllegalStateException("should not Happen "). The schema.oper interface that calls Microservice A to B cannot be adjusted.

       

      The problem is the direct cause of org. Apache. Servicecomb. QPS. QpsControllerManager# updateObjMap method without considering the micro service level for ANY scene, A cache flush in QpsControllerManager#updateObjMap may be missed.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hujinming178 hujinming178
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: