Comments (7)
is it solved?
for me this is the final result
+------------------+
| Record | baz |
+------------------+
| 1 | [10, 9] |
| 2 | [10, 9] |
+------------------+
from concourse.
@chandresh-pancholi can you create a unit test to either repro the bug or confirm it doesn't exist
from concourse.
Actually its not even putting them in descending order.It puts them in random order.
For ex.
add "baz", 10, 1
add "baz", 9, 1
add "baz", 7, 1
add "baz", 8, 1
add "baz", 9, 2
add "baz", 7, 2
add "baz", 10, 2
select([1L, 2L])
+------------------------+
| Record | baz |
+------------------------+
| 1 | [9, 8, 10, 7] |
| 2 | [9, 10, 7] |
+------------------------+
' in 0.038 sec
from concourse.
I see, I think in ConcourseServer we need to use a LinkedHashMap instead of a regular HashMap for the select methods
Sent from my iPhone
On Thu, Jun 16, 2016 at 9:01 AM -0400, "Chandresh Pancholi" [email protected] wrote:
Actually its not even putting them in descending order.It puts them in random order.
For ex.
add "baz", 10, 1
add "baz", 9, 1
add "baz", 7, 1
add "baz", 8, 1
add "baz", 9, 2
add "baz", 7, 2
add "baz", 10, 2
select([1L, 2L])
+------------------------+
| Record | baz |
+------------------------+
| 1 | [9, 8, 10, 7] |
| 2 | [9, 10, 7] |
+------------------------+
' in 0.038 sec
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
from concourse.
We are using LinkedHashMap.
@Override
@Atomic
@Batch
@ThrowsThriftExceptions
public Map<Long, Map<String, Set<TObject>>> selectRecords(
List<Long> records, AccessToken creds,
TransactionToken transaction, String environment) throws TException {
checkAccess(creds, transaction);
AtomicSupport store = getStore(transaction, environment);
Map<Long, Map<String, Set<TObject>>> result = Maps.newLinkedHashMap();
AtomicOperation atomic = null;
System.out.println("------------");
while (atomic == null || !atomic.commit()) {
atomic = store.startAtomicOperation();
try {
for (long record : records) {
result.put(record, atomic.select(record));
}
}
catch (AtomicStateException e) {
atomic = null;
}
}
return result;
}
from concourse.
My bad. Check in the classes that extend Store and make sure the select(record) methods are using a LinkedHashSet instead of a HashSet
Sent from my iPhone
On Thu, Jun 16, 2016 at 9:08 AM -0400, "Chandresh Pancholi" [email protected] wrote:
We are using LinkedHashMap.
@Atomic
@Batch
@ThrowsThriftExceptions
public Map<Long, Map<String, Set<TObject>>> selectRecords(
List<Long> records, AccessToken creds,
TransactionToken transaction, String environment) throws TException {
checkAccess(creds, transaction);
AtomicSupport store = getStore(transaction, environment);
Map<Long, Map<String, Set<TObject>>> result = Maps.newLinkedHashMap();
AtomicOperation atomic = null;
System.out.println("------------");
while (atomic == null || !atomic.commit()) {
atomic = store.startAtomicOperation();
try {
for (long record : records) {
result.put(record, atomic.select(record));
}
}
catch (AtomicStateException e) {
atomic = null;
}
}
return result;
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
from concourse.
Will changes in concourse.thrift loads when concourse server runs?
from concourse.
Related Issues (20)
- Issue in concourse-driver-java HOT 1
- Error message not sent to the Concourse client. HOT 1
- Tutorial
- Dead link HOT 4
- Can't seem to find concourse ruby gem on rubygems.org
- How to install
- http://concoursedb.com / Documentation
- Docker: Java heap space HOT 2
- Sort based on properties and link's value criteria HOT 1
- Improvement of sleep in loop HOT 1
- Time monotonicity bug. HOT 1
- Upgrade Task version bootstrap process does not set version in all places
- The Database can accept duplicate Writes if Blocks are partially synced
- Server crash can cause an irrecoverable error where Revisions are not properly offset
- Cannot override heap_size and other pre-launch configuration in concourse.prefs.dev
- CaSH short syntax doesn't work for regex with parenthesis HOT 1
- ConcurrentModificationException thrown when atomic operation birthed from Transaction commits while receiving concurrent version change notifications (e.g. from Engine accepting Writes)
- Wide write locks are not shared
- RangeLocks coalesce connected ranges and therefore can remove too much protection when unlocked
- Configure heap dump on OOM to occur even if server is not in DEBUG mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from concourse.