Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Storage
Commits
c666ebdd
Commit
c666ebdd
authored
Jan 31, 2022
by
Akanksha Prasad
Browse files
Using cursorCache
parent
b8e17ec5
Pipeline
#90448
failed with stages
in 10 minutes and 12 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
provider/storage-azure/src/main/java/org/opengroup/osdu/storage/provider/azure/repository/QueryRepository.java
View file @
c666ebdd
...
...
@@ -69,10 +69,6 @@ public class QueryRepository implements IQueryRepository {
@Qualifier
(
"CursorCache"
)
private
ICache
<
String
,
String
>
cursorCache
;
@Autowired
@Qualifier
(
"CursorCache"
)
private
ICache
<
String
,
String
>
continuationtoken_nexttable
;
@Autowired
private
DpsHeaders
dpsHeaders
;
...
...
@@ -159,7 +155,7 @@ public class QueryRepository implements IQueryRepository {
try
{
if
(
paginated
)
{
String
continuation
=
null
;
if
(
cursor
==
null
||
c
ontinuationtoken_nexttabl
e
.
get
(
cursor
)
==
storageSchemaContainer
)
{
if
(
cursor
==
null
||
c
ursorCach
e
.
get
(
cursor
)
==
storageSchemaContainer
)
{
int
remRecords
=
0
;
docPage
=
GetItemsPage
(
numRecords
,
cursor
,
storageSchemaContainer
);
docs
=
docPage
.
getContent
();
...
...
@@ -170,27 +166,27 @@ public class QueryRepository implements IQueryRepository {
List
<
String
>
schemaInfoDocs
=
schemaInfoDocPage
.
getContent
();
continuation
=
getContinuationToken
(
schemaInfoDocPage
);
if
(
continuation
!=
null
)
{
c
ontinuationtoken_nexttabl
e
.
put
(
continuation
,
schemaInfoContainer
);
c
ursorCach
e
.
put
(
continuation
,
schemaInfoContainer
);
dqr
.
setCursor
(
continuation
);
}
List
<
String
>
result
=
Stream
.
concat
(
schemaInfoDocs
.
stream
(),
docs
.
stream
()).
collect
(
Collectors
.
toList
());
dqr
.
setResults
(
result
);
}
else
if
(
continuation
==
null
&&
docs
.
size
()
==
numRecords
)
{
c
ontinuationtoken_nexttabl
e
.
put
(
"startofSchema"
,
schemaInfoContainer
);
c
ursorCach
e
.
put
(
"startofSchema"
,
schemaInfoContainer
);
dqr
.
setCursor
(
"startofSchema"
);
dqr
.
setResults
(
docs
);
}
else
if
(
continuation
!=
null
)
{
c
ontinuationtoken_nexttabl
e
.
put
(
continuation
,
storageSchemaContainer
);
c
ursorCach
e
.
put
(
continuation
,
storageSchemaContainer
);
dqr
.
setCursor
(
continuation
);
dqr
.
setResults
(
docs
);
}
}
else
if
(
c
ontinuationtoken_nexttabl
e
.
get
(
cursor
)
==
schemaInfoContainer
)
{
}
else
if
(
c
ursorCach
e
.
get
(
cursor
)
==
schemaInfoContainer
)
{
String
newCursor
=
cursor
.
equals
(
"startofSchema"
)
==
true
?
null
:
cursor
;
docPage
=
GetItemsPage
(
numRecords
,
newCursor
,
schemaInfoContainer
);
docs
=
docPage
.
getContent
();
continuation
=
getContinuationToken
(
docPage
);
if
(
continuation
!=
null
)
{
c
ontinuationtoken_nexttabl
e
.
put
(
continuation
,
schemaInfoContainer
);
c
ursorCach
e
.
put
(
continuation
,
schemaInfoContainer
);
dqr
.
setCursor
(
continuation
);
}
dqr
.
setResults
(
docs
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment