проблема производительности API-интерфейса microsoft graph - результаты поиска пустые - PullRequest
0 голосов
/ 17 февраля 2020

У нас есть проблема производительности с конечной точкой /events в Microsoft Graph, когда поисковый запрос с iCalUID возвращает пустой, но затем возвращает данные при повторном вызове через несколько секунд.

Контекст: в нашем функционале поток, мы подписываемся на календарь ресурсов комнаты для уведомлений pu sh. Когда календарь комнаты отправляет уведомление, мы выбираем событие по id, а затем ищем событие в календаре организатора по iCalUID. Этот поиск иногда терпит неудачу. В приведенном ниже примере

  1. Организатор создал собрание на 11-02-2019 08:35:05 и получил подтверждение от Room на 11-02-2019 08:35:05. Мы получили уведомление pu sh от Room на 2020-02-11 08:35:05.300

    2020-02-11 08:35:05.300 DEBUG 9677 --- 
    [http-nio-9696-exec-18] c.m.c.r.web.PushNotificationListener     : 
    Received Graph push notification for tenant : ***_PROD
    
  2. Приложение под названием Graph для поиска событий по iCalUID на 2020-02-11 08:35:10.428

    2020-02-11 08:35:10.428 DEBUG 9677 --- 
    [Camel (camel-1) thread #5 - JmsConsumer[inboundSyncQueue_2]] c.m.c.r.util.LoggingRequestInterceptor: 
    URI: https://graph.microsoft.com/v1.0/users/J****e.I****t@s****l.com/events?$filter=iCalUId%20eq%20%27040000008200E00074C5B7101A82E0080000000020122186BEE0D501000000000000000010000000E*5A6DF579C44241BD9FCC736C081D46%27
    
  3. Приложение получило пустой ответ

    2020-02-11 08:35:10.822 DEBUG 9677 --- 
    [Camel (camel-1) thread #5 - JmsConsumer[inboundSyncQueue_2]] c.m.c.r.util.LoggingRequestInterceptor   : 
    Response body: 
    {
        "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('J****e.I****t%40s****l.com')/events",
        "value": []
    }
    
  4. Приложение снова вызвало Graph, используя iCalUID on 2020-02-11 08:35:16.046

    2020-02-11 08:35:16.046 DEBUG 9677 --- 
    [Camel (camel-1) thread #5 - JmsConsumer[inboundSyncQueue_2]] c.m.c.r.util.LoggingRequestInterceptor   : 
    URI: https://graph.microsoft.com/v1.0/users/J****e.I****t@s****l.com/events?$filter=iCalUId%20eq%20%27040000008200E00074C5B7101A82E0080000000020122186BEE0D501000000000000000010000000E*5A6DF579C44241BD9FCC736C081D46%27
    
  5. Приложение получило ответ с подробностями события

    2020-02-11 08:35:16.221 DEBUG 9677 --- 
    [Camel (camel-1) thread #5 - JmsConsumer[inboundSyncQueue_2]] c.m.c.r.util.LoggingRequestInterceptor   : 
    Response body: 
    {
        "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('J****e.I****t%40s****l.com')/events",
        "value": [
            {
                "@odata.etag": "W/\"EDlk1iwnM0yaLeTrvK5YsAAAdJA=\"",
                "id": "AAMkADhlMjU4MzM5LWViMjEtNDQ4Zi05YjhjLTQ1OWNkZTA2NWMyOQBGAAAAAADjEKz5maFURYkhxp0mspnVBwCska11G9p3RJzOljoM***qAAAAAAEOAACPlUNbaXKwSL8UL4c6VR2-AAGCM9x_AAA=",
                "createdDateTime": "2020-02-11T08:35:15.3785752Z",
                "lastModifiedDateTime": "2020-02-11T08:34:22.025Z",
                "changeKey": "EDlk1iwnM0yaLeTrvK5YsAAAdJA=",
                "categories": [],
                "originalStartTimeZone": "Romance Standard Time",
                "originalEndTimeZone": "Romance Standard Time",
                "iCalUId": "040000008200E00074C5B7101A82E0080000000020122186BEE0D501000000000000000010000000E75A6DF579C44241BD9FCC736C081D46",
                "reminderMinutesBeforeStart": 15,
                "isReminderOn": true,
                "hasAttachments": false,
                "subject": "TestJ****e_Rec_Outlook_invite",
                "bodyPreview": "",
                "importance": "normal",
                "sensitivity": "normal",
                "isAllDay": false,
                "isCancelled": false,
                "isOrganizer": true,
                "responseRequested": true,
                "seriesMasterId": null,
                "showAs": "busy",
                "type": "seriesMaster",
                "webLink": "https://outlook.office365.com/owa/?itemid=AAMkADhlMjU4MzM5LWViMjEtNDQ4Zi05YjhjLTQ1OWNkZTA2NWMyOQBGAAAAAADjEKz5maFURYkhxp0mspnVBwCska11G9p3RJzOljoM***qAAAAAAEOAACPlUNbaXKwSL8UL4c6VR2%2FAAGCM9x%2BAAA%3D&exvsurl=1&path=/calendar/item",
                "onlineMeetingUrl": null,
                "responseStatus": {
                    "response": "organizer",
                    "time": "0001-01-01T00:00:00Z"
                },
                "body": {
                    "contentType": "html",
                    "content": "<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\r\n<meta content=\"text/html; charset=us-ascii\">\r\n<meta name=\"Generator\" content=\"Microsoft Word 15 (filtered medium)\">\r\n<style>\r\n<!--\r\n@font-face\r\n\t{font-family:\"Cambria Math\"}\r\n@font-face\r\n\t{font-family:Calibri}\r\n@font-face\r\n\t{font-family:\"Segoe UI\"}\r\np.MsoNormal, li.MsoNormal, div.MsoNormal\r\n\t{margin:0cm;\r\n\tmargin-bottom:.0001pt;\r\n\tfont-size:11.0pt;\r\n\tfont-family:\"Calibri\",sans-serif}\r\na:link, span.MsoHyperlink\r\n\t{color:#0563C1;\r\n\ttext-decoration:underline}\r\na:visited, span.MsoHyperlinkFollowed\r\n\t{color:#954F72;\r\n\ttext-decoration:underline}\r\np.msonormal0, li.msonormal0, div.msonormal0\r\n\t{margin-right:0cm;\r\n\tmargin-left:0cm;\r\n\tfont-size:11.0pt;\r\n\tfont-family:\"Calibri\",sans-serif}\r\nspan.EmailStyle18\r\n\t{font-family:\"Segoe UI\",sans-serif;\r\n\tcolor:windowtext}\r\n.MsoChpDefault\r\n\t{font-size:10.0pt}\r\n@page WordSection1\r\n\t{margin:72.0pt 72.0pt 72.0pt 72.0pt}\r\ndiv.WordSection1\r\n\t{}\r\n-->\r\n</style>\r\n</head>\r\n<body lang=\"en-BE\" link=\"#0563C1\" vlink=\"#954F72\">\r\n<div class=\"WordSection1\">\r\n<p class=\"MsoNormal\"><span style=\"font-size:10.0pt; font-family:&quot;Segoe UI&quot;,sans-serif\">&nbsp;</span></p>\r\n</div>\r\n</body>\r\n</html>\r\n"
                },
                "start": {
                    "dateTime": "2020-02-11T17:00:00.0000000",
                    "timeZone": "UTC"
                },
                "end": {
                    "dateTime": "2020-02-11T17:30:00.0000000",
                    "timeZone": "UTC"
                },
                "location": {
                    "displayName": "Corner",
                    "locationType": "default",
                    "uniqueId": "Corner",
                    "uniqueIdType": "private"
                },
                "locations": [
                    {
                        "displayName": "Corner",
                        "locationUri": "Corner@s****l.com",
                        "locationType": "conferenceRoom",
                        "uniqueId": "Corner@s****l.com",
                        "uniqueIdType": "directory",
                        "address": {},
                        "coordinates": {}
                    }
                ],
                "recurrence": {
                    "pattern": {
                        "type": "weekly",
                        "interval": 1,
                        "month": 0,
                        "dayOfMonth": 0,
                        "daysOfWeek": [
                            "tuesday"
                        ],
                        "firstDayOfWeek": "monday",
                        "index": "first"
                    },
                    "range": {
                        "type": "numbered",
                        "startDate": "2020-02-11",
                        "endDate": "0001-01-01",
                        "recurrenceTimeZone": "Romance Standard Time",
                        "numberOfOccurrences": 3
                    }
                },
                "attendees": [
                    {
                        "type": "required",
                        "status": {
                            "response": "none",
                            "time": "0001-01-01T00:00:00Z"
                        },
                        "emailAddress": {
                            "name": "J****e I****t",
                            "address": "J****e.I****t@s****l.com"
                        }
                    },
                    {
                        "type": "required",
                        "status": {
                            "response": "none",
                            "time": "4501-01-01T00:00:00Z"
                        },
                        "emailAddress": {
                            "name": "J****r D****t",
                            "address": "J****r.D****t@s****l.com"
                        }
                    },
                    {
                        "type": "resource",
                        "status": {
                            "response": "none",
                            "time": "4501-01-01T00:00:00Z"
                        },
                        "emailAddress": {
                            "name": "Corner",
                            "address": "Corner@s****l.com"
                        }
                    }
                ],
                "organizer": {
                    "emailAddress": {
                        "name": "J****e I****t",
                        "address": "J****e.I****t@s****l.com"
                    }
                }
            }
        ]
    }
    
  6. CreatedTime неверно и больше, чем время последнего изменения:

  7. Почтовый ящик пользователя, а также сервер приложений находится в регионе Западной Европы

    2020-02-11 08:35:10.822 DEBUG 9677 --- [Camel (camel-1) thread #5 - JmsConsumer[inboundSyncQueue_2]] c.m.c.r.util.LoggingRequestInterceptor   : 
    Headers: 
    {
        Cache-Control=[private], 
        Content-Type=[application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8], Vary=[Accept-Encoding], request-id=[4f5856d4-dc17-424d-a3ed-fe90914f0c4e], 
        client-request-id=[4f5856d4-dc17-424d-a3ed-fe90914f0c4e],
        x-ms-ags-diagnostic=[
            {
                "ServerInfo": {
                    "DataCenter": "West Europe",
                    "Slice": "SliceC",
                    "Ring": "5",
                    "ScaleUnit": "003",
                    "RoleInstance": "AGSFE_IN_42"
                }
            }
        ], 
        OData-Version=[4.0], 
        Strict-Transport-Security=[max-age=31536000], 
        Date=[Tue,11 Feb 2020 08: 35: 10 GMT]
    }
    
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...