Skip to content

Commit 1a43ab6

Browse files
authored
FMWK-452 Update dependencies and version (#750)
1 parent 3ff86af commit 1a43ab6

File tree

8 files changed

+86
-34
lines changed

8 files changed

+86
-34
lines changed

README.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ Data Aerospike - Projections]
5656
[width="100%",cols="<24%,<14%,<18%,<26%,<18%",options="header",]
5757
|===
5858
|Spring Data Aerospike |Spring Boot |Aerospike Client |Aerospike Reactor Client |Aerospike Server
59+
|4.8.x |3.3.x |7.2.x |7.1.x |5.2.x.x +
60+
5961
|4.7.x |3.2.x |7.2.x |7.1.x |5.2.x.x +
6062
6163
|4.6.x |3.2.x |7.2.x |7.1.x |5.2.x.x +

pom.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.aerospike</groupId>
88
<artifactId>spring-data-aerospike</artifactId>
9-
<version>4.7.1</version>
9+
<version>4.8.0</version>
1010
<name>Spring Data Aerospike</name>
1111
<organization>
1212
<name>Aerospike Inc.</name>
@@ -16,31 +16,31 @@
1616
<parent>
1717
<groupId>org.springframework.data.build</groupId>
1818
<artifactId>spring-data-parent</artifactId>
19-
<version>3.2.4</version>
19+
<version>3.3.0</version>
2020
</parent>
2121

2222
<properties>
2323
<java.version>17</java.version>
2424
<maven.compiler.source>${java.version}</maven.compiler.source>
2525
<maven.compiler.target>${java.version}</maven.compiler.target>
2626
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
27-
<springdata.commons>3.2.4</springdata.commons>
28-
<springdata.keyvalue>3.2.4</springdata.keyvalue>
29-
<springdata.spring-boot>3.2.3</springdata.spring-boot>
30-
<spring-boot-starter-test>3.2.3</spring-boot-starter-test>
31-
<spring-cloud-starter-bootstrap>4.1.1</spring-cloud-starter-bootstrap>
27+
<springdata.commons>3.3.0</springdata.commons>
28+
<springdata.keyvalue>3.3.0</springdata.keyvalue>
29+
<springdata.spring-boot>3.3.0</springdata.spring-boot>
30+
<spring-boot-starter-test>3.3.0</spring-boot-starter-test>
31+
<spring-cloud-starter-bootstrap>4.1.2</spring-cloud-starter-bootstrap>
3232
<maven.javadoc.plugin>3.3.0</maven.javadoc.plugin>
3333
<maven.gpg.plugin>1.6</maven.gpg.plugin>
3434
<aerospike-client>7.2.1</aerospike-client>
3535
<aerospike-reactor-client>7.1.0</aerospike-reactor-client>
3636
<reactor-test>3.6.1</reactor-test>
37-
<embedded-aerospike>3.1.5</embedded-aerospike>
37+
<embedded-aerospike>3.1.6</embedded-aerospike>
3838
<jodatime>2.12.7</jodatime>
39-
<lombok>1.18.30</lombok>
39+
<lombok>1.18.32</lombok>
4040
<awaitility>4.2.1</awaitility>
41-
<logback.test>1.5.3</logback.test>
41+
<logback.test>1.5.6</logback.test>
4242
<hibernate.validator>8.0.1.Final</hibernate.validator>
43-
<netty.version>4.1.107.Final</netty.version>
43+
<netty.version>4.1.110.Final</netty.version>
4444
</properties>
4545

4646
<licenses>

src/main/asciidoc/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= Spring Data Aerospike - Documentation
22
:doctype: book
3-
:revnumber: 4.7.1
3+
:revnumber: 4.8.0
44
:revdate: {localdate}
55
:toc:
66
:toc-placement!:

src/main/asciidoc/reference/configuration.adoc

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ It has precedence over reading from application.properties. Here is an example:
177177
@EnableAerospikeRepositories(basePackageClasses = TestRepository.class)
178178
class ApplicationConfig extends AbstractAerospikeDataConfiguration {
179179
180-
181180
@Override
182181
public void configureDataSettings(AerospikeDataSettings aerospikeDataSettings) {
183182
aerospikeDataSettings.setScansEnabled(false);
@@ -210,7 +209,6 @@ It has precedence over reading from application.properties. Here is an example:
210209
@EnableAerospikeRepositories(basePackageClasses = TestRepository.class)
211210
class ApplicationConfig extends AbstractAerospikeDataConfiguration {
212211
213-
214212
@Override
215213
public void configureDataSettings(AerospikeDataSettings aerospikeDataSettings) {
216214
aerospikeDataSettings.setCreateIndexesOnStartup(true);
@@ -240,7 +238,6 @@ It has precedence over reading from application.properties. Here is an example:
240238
@EnableAerospikeRepositories(basePackageClasses = TestRepository.class)
241239
class ApplicationConfig extends AbstractAerospikeDataConfiguration {
242240
243-
244241
@Override
245242
public void configureDataSettings(AerospikeDataSettings aerospikeDataSettings) {
246243
aerospikeDataSettings.setIndexCacheRefreshSeconds(3600);
@@ -270,7 +267,6 @@ It has precedence over reading from application.properties. Here is an example:
270267
@EnableAerospikeRepositories(basePackageClasses = TestRepository.class)
271268
class ApplicationConfig extends AbstractAerospikeDataConfiguration {
272269
273-
274270
@Override
275271
public void configureDataSettings(AerospikeDataSettings aerospikeDataSettings) {
276272
aerospikeDataSettings.setServerVersionRefreshSeconds(3600);
@@ -300,7 +296,6 @@ It has precedence over reading from application.properties. Here is an example:
300296
@EnableAerospikeRepositories(basePackageClasses = TestRepository.class)
301297
class ApplicationConfig extends AbstractAerospikeDataConfiguration {
302298
303-
304299
@Override
305300
public void configureDataSettings(AerospikeDataSettings aerospikeDataSettings) {
306301
aerospikeDataSettings.setQueryMaxRecords(10000L);
@@ -330,7 +325,6 @@ It has precedence over reading from application.properties. Here is an example:
330325
@EnableAerospikeRepositories(basePackageClasses = TestRepository.class)
331326
class ApplicationConfig extends AbstractAerospikeDataConfiguration {
332327
333-
334328
@Override
335329
public void configureDataSettings(AerospikeDataSettings aerospikeDataSettings) {
336330
aerospikeDataSettings.setBatchWriteSize(100);
@@ -386,7 +380,6 @@ It has precedence over reading from application.properties. Here is an example:
386380
@EnableAerospikeRepositories(basePackageClasses = TestRepository.class)
387381
class ApplicationConfig extends AbstractAerospikeDataConfiguration {
388382
389-
390383
@Override
391384
public void configureDataSettings(AerospikeDataSettings aerospikeDataSettings) {
392385
aerospikeDataSettings.setKeepOriginalKeyTypes(false);
@@ -396,3 +389,35 @@ class ApplicationConfig extends AbstractAerospikeDataConfiguration {
396389

397390
*Default*: `false` (store keys only as `String`).
398391

392+
[[configuration.write-sorted-maps]]
393+
=== writeSortedMaps
394+
395+
[source,properties]
396+
----
397+
# application.properties
398+
spring-data-aerospike.data.writeSortedMaps=true
399+
----
400+
401+
Define how Maps and POJOs are written: `true` - as sorted maps (`TreeMap`, default), `false` - as unsorted (`HashMap`).
402+
403+
Writing as unsorted maps (`false`) degrades performance of Map-related operations and does not allow comparing Maps,
404+
so it is strongly recommended to change the default value only if required during upgrade from older versions
405+
of Spring Data Aerospike.
406+
407+
NOTE: Another way of defining the parameter is overriding the `configureDataSettings()` method.
408+
It has precedence over reading from application.properties. Here is an example:
409+
410+
[source,java]
411+
----
412+
// overriding method
413+
@EnableAerospikeRepositories(basePackageClasses = TestRepository.class)
414+
class ApplicationConfig extends AbstractAerospikeDataConfiguration {
415+
416+
@Override
417+
public void configureDataSettings(AerospikeDataSettings aerospikeDataSettings) {
418+
aerospikeDataSettings.setWriteSortedMaps(true);
419+
}
420+
}
421+
----
422+
423+
*Default*: `true` (write Maps and POJOs as sorted maps).

src/main/java/org/springframework/data/aerospike/config/AbstractAerospikeDataConfiguration.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ public QueryEngine queryEngine(IAerospikeClient aerospikeClient,
5959
QueryEngine queryEngine = new QueryEngine(aerospikeClient, statementBuilder, filterExpressionsBuilder,
6060
settings.getDataSettings());
6161
boolean scansEnabled = settings.getDataSettings().isScansEnabled();
62-
log.debug("AerospikeDataSettings.scansEnabled: {}", scansEnabled);
62+
log.info("AerospikeDataSettings.scansEnabled: {}", scansEnabled);
6363
queryEngine.setScansEnabled(scansEnabled);
6464
long queryMaxRecords = settings.getDataSettings().getQueryMaxRecords();
65-
log.debug("AerospikeDataSettings.queryMaxRecords: {}", queryMaxRecords);
65+
log.info("AerospikeDataSettings.queryMaxRecords: {}", queryMaxRecords);
6666
queryEngine.setQueryMaxRecords(queryMaxRecords);
6767
if (!settings.getDataSettings().isWriteSortedMaps()) {
6868
log.info("AerospikeDataSettings.writeSortedMaps is set to false, " +
69-
"Maps and POJOs will be written as unsorted Maps (degrades performance of Map-related operations ," +
69+
"Maps and POJOs will be written as unsorted Maps (degrades performance of Map-related operations," +
7070
" does not allow comparing Maps)");
7171
}
7272
return queryEngine;
@@ -78,7 +78,7 @@ public AerospikePersistenceEntityIndexCreator aerospikePersistenceEntityIndexCre
7878
AerospikeIndexResolver aerospikeIndexResolver,
7979
ObjectProvider<AerospikeTemplate> template, AerospikeSettings settings) {
8080
boolean indexesOnStartup = settings.getDataSettings().isCreateIndexesOnStartup();
81-
log.debug("AerospikeDataSettings.indexesOnStartup: {}", indexesOnStartup);
81+
log.info("AerospikeDataSettings.indexesOnStartup: {}", indexesOnStartup);
8282
return new AerospikePersistenceEntityIndexCreator(aerospikeMappingContext, indexesOnStartup,
8383
aerospikeIndexResolver, template);
8484
}
@@ -91,7 +91,7 @@ public IndexRefresher indexRefresher(IAerospikeClient aerospikeClient, IndexesCa
9191
refresher.refreshIndexes();
9292
int refreshFrequency = settings.getDataSettings().getIndexCacheRefreshSeconds();
9393
processCacheRefreshFrequency(refreshFrequency, refresher);
94-
log.debug("AerospikeDataSettings.indexCacheRefreshSeconds: {}", refreshFrequency);
94+
log.info("AerospikeDataSettings.indexCacheRefreshSeconds: {}", refreshFrequency);
9595
return refresher;
9696
}
9797

src/main/java/org/springframework/data/aerospike/config/AbstractReactiveAerospikeDataConfiguration.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,15 @@ public ReactorQueryEngine reactorQueryEngine(IAerospikeReactorClient aerospikeRe
7171
filterExpressionsBuilder, settings.getDataSettings());
7272
boolean scansEnabled = settings.getDataSettings().isScansEnabled();
7373
queryEngine.setScansEnabled(scansEnabled);
74-
log.debug("AerospikeDataSettings.scansEnabled: {}", scansEnabled);
74+
log.info("AerospikeDataSettings.scansEnabled: {}", scansEnabled);
7575
long queryMaxRecords = settings.getDataSettings().getQueryMaxRecords();
76-
log.debug("AerospikeDataSettings.queryMaxRecords: {}", queryMaxRecords);
76+
log.info("AerospikeDataSettings.queryMaxRecords: {}", queryMaxRecords);
7777
queryEngine.setQueryMaxRecords(queryMaxRecords);
78+
if (!settings.getDataSettings().isWriteSortedMaps()) {
79+
log.info("AerospikeDataSettings.writeSortedMaps is set to false, " +
80+
"Maps and POJOs will be written as unsorted Maps (degrades performance of Map-related operations," +
81+
" does not allow comparing Maps)");
82+
}
7883
return queryEngine;
7984
}
8085

@@ -110,7 +115,7 @@ public ReactiveAerospikePersistenceEntityIndexCreator aerospikePersistenceEntity
110115
AerospikeIndexResolver aerospikeIndexResolver,
111116
ObjectProvider<ReactiveAerospikeTemplate> template, AerospikeSettings settings) {
112117
boolean indexesOnStartup = settings.getDataSettings().isCreateIndexesOnStartup();
113-
log.debug("AerospikeDataSettings.indexesOnStartup: {}", indexesOnStartup);
118+
log.info("AerospikeDataSettings.indexesOnStartup: {}", indexesOnStartup);
114119
return new ReactiveAerospikePersistenceEntityIndexCreator(aerospikeMappingContext,
115120
indexesOnStartup, aerospikeIndexResolver, template);
116121
}

src/main/java/org/springframework/data/aerospike/config/AerospikeDataSettings.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public class AerospikeDataSettings {
3737
// Define how @Id fields (primary keys) and Map keys are stored: false - always as String,
3838
// true - preserve original type if supported
3939
boolean keepOriginalKeyTypes = false;
40-
// Define how Maps are written: true - as TreeMaps (default), false - as HashMaps
40+
// Define how Maps and POJOs are written: true - as sorted maps (TreeMaps, default), false - as unsorted (HashMaps)
41+
// Writing unsorted maps (false) degrades performance of Map-related operations and does not allow comparing Maps,
42+
// strongly recommended not to use except during upgrade from older versions of Spring Data Aerospike (if required)
4143
boolean writeSortedMaps = true;
4244
}

src/main/java/org/springframework/data/aerospike/repository/query/CriteriaDefinition.java

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,29 @@ enum AerospikeNullQueryCriterion {
4545
}
4646

4747
enum AerospikeMetadata {
48-
SINCE_UPDATE_TIME, // Exp.sinceUpdate(), milliseconds
49-
LAST_UPDATE_TIME, // Exp.lastUpdate(), nanoseconds since epoch
50-
VOID_TIME, // Exp.voidTime(), nanoseconds since epoch
51-
TTL, // Exp.ttl(), integer seconds
52-
RECORD_SIZE_ON_DISK, // Exp.deviceSize(), bytes
53-
RECORD_SIZE_IN_MEMORY // Exp.memorySize(), bytes
48+
/**
49+
* Exp.sinceUpdate(), milliseconds
50+
*/
51+
SINCE_UPDATE_TIME,
52+
/**
53+
* Exp.lastUpdate(), nanoseconds since epoch
54+
*/
55+
LAST_UPDATE_TIME,
56+
/**
57+
* Exp.voidTime(), nanoseconds since epoch
58+
*/
59+
VOID_TIME,
60+
/**
61+
* Exp.ttl(), integer seconds
62+
*/
63+
TTL,
64+
/**
65+
* Exp.recordSize() (Exp.deviceSize() for Server ver. < 7.0), bytes
66+
*/
67+
RECORD_SIZE_ON_DISK,
68+
/**
69+
* Exp.recordSize() (Exp.memorySize() for Server ver. < 7.0), bytes
70+
*/
71+
RECORD_SIZE_IN_MEMORY
5472
}
5573
}

0 commit comments

Comments
 (0)